MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Alter clustered index

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
showkath
Beginner


Joined: 23 Mar 2005
Posts: 17
Topics: 7

PostPosted: Thu Oct 04, 2007 4:38 pm    Post subject: Alter clustered index Reply with quote

Hi,

I am looking for the exact syntax or samples for altering a clustered index for redefining the index cluster with new values.

Also please let me know the steps involved in implementing this change.

I think, after the alter index just do a re-org. Am I correct ? Please help.
_________________
Regards,
Showkath
-----------------------------------------------------
Our opinions do not really blossom into fruition until we have expressed them to someone else - Mark Twain
Back to top
View user's profile Send private message
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Thu Oct 04, 2007 10:08 pm    Post subject: Reply with quote

eg. ix1 is the old cluster index, ix2 will be used as new cluster index

DDL:

ALTER INDEX ix1 NOT CLUSTER;
ALTER INDEX ix2 CLUSTER;

after alter index, REORG will help performance improvement
Back to top
View user's profile Send private message
SMS
Beginner


Joined: 16 Oct 2005
Posts: 53
Topics: 24

PostPosted: Thu Oct 04, 2007 11:06 pm    Post subject: Reply with quote

Thanks.

I already tried like the below one. But It's throwing error.

ALTER INDEX <index name> CLUSTER
(PART 1 VALUES(xxxx),
PART 2 VALUES(xxxX)
...
PART 10 VALUES(xxxx));


Actually the table space is partitioned. Index space is partitioned based on 10 values. Now the 10 values needs to be re-arranged.
_________________
Regards,
SMS
Back to top
View user's profile Send private message
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Fri Oct 05, 2007 6:37 am    Post subject: Reply with quote

What's the error message?

Maybe you should try to use 2 ALTER statements, one for ALTER cluster, and the other for ALTER partition key range.
Back to top
View user's profile Send private message
SMS
Beginner


Joined: 16 Oct 2005
Posts: 53
Topics: 24

PostPosted: Fri Oct 05, 2007 11:02 am    Post subject: Reply with quote

I got it. Actually the parenthesis is not required after CLUSTER. Thanks for the suggestions.
_________________
Regards,
SMS
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group