|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 03, 2013 8:54 AM
Points: 113,
Visits: 890
|
|
Hi all, I have a job weekly, it runs on Sunday. The purpose is REBUILD/REORGANIZE all indexes in my database.
If avg_fragmentation_in_percent > 5 and <=30% Then REORGANIZE If avg_fragmentation_in_percent > 30% Then REBUILD
However, I saw the several indexes are not impacted by this job. I know that SQL engine will not do anything in case page_count of an index is small. But does anyone know what threshold of page_count SQL Engine will use to rebuil/reorganize indexes?
In my case, I have a index
TableName | IndexName | avg_fragmentation_in_percent | page_count ProductPromotion | PK_ProductPromotion | 58.33333333 | 12
Thanks,
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:59 PM
Points: 37,640,
Visits: 29,895
|
|
The SQL engine has no such threshold (well, other than it can't rebuild a 1 page index). Even with 2 it will run the rebuild/reorg. Probably won't have much if any effect, but it will run it.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|