SQL index recovery - when?

When do i need to rebuild indexes? Nightly Weekly? Hourly?

+5
source share
4 answers

It depends on the fragmentation levels, and not on the timeframe at all, see the Automated Index Defrag Script here Michelle Ufford, he will check the fragmentation levels and only rebuild / reorg if necessary

+6
source

Run an intelligent script (from SQL Fool) , nightly, and it will decide to do nothing, defragment or rebuild.

In principle, it is minimally commensurate with the levels of fragmentation.

, . , .

+3

.

avg_fragmentation_in_percent > 5% <= 30%, . avg_fragmentation_in_percent > 30%, .

+1

SQL Server 2005:
   ALTER INDEX... REORGANIZE , : (avg_page_space_used_in_percent < 75 > 60) (avg_fragmentation_in_percent > 10 < 15)

ALTER INDEX... REBUILD , : (avg_page_space_used_in_percent < 60) (avg_fragmentation_in_percent > 15)

0

All Articles