• ScottPletcher (11/26/2012)


    Of course don't rebuild needlessly; check the stats and only rebuild those indexes that require it.

    Also, with a reasonably well-tuned tempdb, you should strongly consider using the:

    SORT_IN_TEMPDB = ON

    option. This can help reduce fragmentation of the data file as well.

    Even then, you may get a nasty suprise -- after you rebuild the indexes, the db file might be close to the same size it was originally! So be sure to check after rebuilding.

    i think "SORT_IN_TEMPDB = ON" is enterprise only (although i may be completely wrong and only an online rebuild is enterprise only) also i would go ahead and rebuild all the indexes after you shrink the DB file as shrinking the DB file may mess with every index in the DB. just make the rebuild time part of the maintenance down time if you can afford it.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]