Search This Blog

Friday, September 28, 2007

Drop Index

I have a Large table with 1 million records and a Clustered Index, 4 Non Clustered Indexes on the table. I have to re-index the table. Which Index I should drop first?

In presence of Clustered Index, Non Clustered index holds Clustered Index key as part of Index Key value. So, if we drop the Clustered index before dropping Non Clustered Indexes, SQL Server has to modify the Non clustered index keys with ROWID in place of Clustered index key value. This causes more overload on db log, tempdb log Files as well. So, Drop the Non clustered indexes first , and then followed by Clustered Index.

2 comments:

Anonymous said...

Just wish to say your article is as surprising. The clarity in your
post is just spectacular and i could assume you are an expert on this subject.
Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post.

Thanks a million and please carry on the enjoyable work.

Anonymous said...

Hey There. I found your weblog using msn. That is a very smartly written article.

I will be sure to bookmark it and come back to read extra of your helpful information. Thank you
for the post. I'll certainly return.