SQL Server 2005 Smart Defrag Page Count
For the past year or so, I’ve taken a role to try to upkeep the maintenance of our SQL Server Database Systems. One of the problems we were having was with defragging indices and updating statistics while international customers were accessing the systems.
I started working to find a Smart Defragging solution that would not Defrag every index on every system.
I was able to use SQLFool’s Automated Index Defrag Solution with some small modifications, including increasing the page_count criteria from 8 to 1000 and adding a variable for fillfactor.