February 15, 2012 at 1:16 pm
hi,
my table has 1 primary clustered key and 2 non clustered key.Now i want to rebuild cluster key,do i need to drop non clustered keys and rebuild ,or juts build without doing anything.
Please explain.
Thanks
February 15, 2012 at 1:26 pm
You don't have to drop the NCs to rebuild a CI.
Jared
CE - Microsoft
February 15, 2012 at 1:49 pm
Just rebuild the clustered index, there's no need to drop anything and having the nonclustered indexes won't make the clustered index rebuild longer or make it do more.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 15, 2012 at 3:59 pm
hi
how to rebuild clustered index.any command
February 15, 2012 at 4:01 pm
Open up Books Online (the SQL help file/manual) and read over the page ALTER INDEX
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 16, 2012 at 11:17 pm
shah.simmy (2/15/2012)
my table has 1 primary clustered key and 2 non clustered key.Now i want to rebuild cluster key,do i need to drop non clustered keys and rebuild ,or juts build without doing anything.
Is it a PRIMARY KEY or a UNIQUE CLUSTERED INDEX? Are you changing the keys? Might help if you provide the table and index creation scripts, and a detailed explanation of what you want to do, and why.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply