• SQLAli (12/16/2013)


    Suneel,

    No i did not try to rebuild the indexes. As i explained before i just shrunk the .mdf and space gets released.

    You're pretty well screwed then because, except for simple truncation during a shrink, shrink fragments nearly everything to 99% fragmented. You at least need to follow a shrink with a REORGANIZE (although that will only fix the Leaf Level of the indexes and data). Since REORGANIZE doesn't update stats, you should update the stats, as well.

    --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)