order of dropping index

  • Does it matter which index I drop first (clustered or normal b-tree) and more importantly, Why?

    -k

  • No it doesn't matter.

  • Somebody correct me if I'm wrong, But I think that you should drop all non-clustered indexes before droping the clustered index. Because the clustered index keeps the data in its pages, when it is dropped the data is reorganized for the subsequent non-clustered indexes, costing time. Similar to why you want to create the clustered index first. So data in, let's say 4 other indexes, isn't resorted to straighten out the new pointers.

    Hope this helps.

    Tom

  • Yes when dropping indexes especially in a hurry then drop the non-clustered first then the clustered. Every time a clustered index is altered all non-clustered indexes are rebuilt automatically and will bog you down in some cases.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply