• sql crazy kid (12/31/2013)


    If i drop a clustered index from table, how the non clustered behave when this is on same table.

    Will all the non clustered index drop and recreate? or it just reorganize with rid?

    What is the performance impact when droaping clustered index from a big table,also that having multiple non clustered index?

    If you drop a Clustered Index, all of the NCIs will rebuild because all NCIs contain either the Clustered Index Key or, in the absence of a CI, they will contain a rowID for the HEAP. So far as the performance impact goes, it depends. If a query is using the CI columns of the NCI and those suddenly go away, the index might not even be used for the query which might result in a table scan unless a different index is sufficient and is picked up by the query.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)