View previous topic :: View next topic |
Author |
Message |
showkath Beginner
Joined: 23 Mar 2005 Posts: 17 Topics: 7
|
Posted: Thu Oct 04, 2007 4:38 pm Post subject: Alter clustered index |
|
|
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 |
|
|
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Thu Oct 04, 2007 10:08 pm Post subject: |
|
|
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 |
|
|
SMS Beginner
Joined: 16 Oct 2005 Posts: 53 Topics: 24
|
Posted: Thu Oct 04, 2007 11:06 pm Post subject: |
|
|
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 |
|
|
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Fri Oct 05, 2007 6:37 am Post subject: |
|
|
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 |
|
|
SMS Beginner
Joined: 16 Oct 2005 Posts: 53 Topics: 24
|
Posted: Fri Oct 05, 2007 11:02 am Post subject: |
|
|
I got it. Actually the parenthesis is not required after CLUSTER. Thanks for the suggestions. _________________ Regards,
SMS |
|
Back to top |
|
|
|
|