Dropping indexes

  • Koen Verbeeck

    SSC Guru

    Points: 258955

    Nice question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • sqlnaive

    SSCoach

    Points: 17435

    george sibbald (1/2/2014)


    Thomas Abraham (1/2/2014)


    Got it wrong as I was using http://technet.microsoft.com/en-us/library/ms176118.aspx as a reference and it says, in part:

    If a clustered index is dropped by using MOVE TO, any nonclustered indexes on the base table are rebuilt, but they remain in their original filegroups or partition schemes. If the base table is moved to a different filegroup or partition scheme, the nonclustered indexes are not moved to coincide with the new location of the base table (heap). Therefore, even if the nonclustered indexes were previously aligned with the clustered index, they might no longer be aligned with the heap.

    which would appear to contradict the given answer.

    What am I missing here?

    non-clustered indexes also contain the clustered index column(s) to identify the location of the actual rows to retrieve data from. If the clustered index is dropped then the non-clustered indexes have to be rebuilt to remove the clustered index and replace it with row ID information

    I thought exactly the same and got it right. Very good question Jagadish.

  • PHYData DBA

    SSCertifiable

    Points: 7541

    Great question. So interesting how almost half the people that answered got it wrong.

  • PChiragS

    SSCarpal Tunnel

    Points: 4965

    good question.

Viewing 4 posts - 16 through 19 (of 19 total)

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