To help maintain index quality, defragging of any given index is a good thing. This will defrag ALL indecies in the current DB. NOTE: Schedule for off-hours operations.
For a massive re-write of indecies, change the remarking on "--IF @indid" lines to use reindex instead of just defragging.
Rebuilding Stats: Twice or Not At All
Are you rebuilding statistics twice on your tables? Longtime expert, Andy Warren, shows why you might be asking more work of your SQL Server than is required.
2008-07-29
9,130 reads