In 2011, EmpireCLS needed a way to automate index rebuild and re-organizations in SQL Server. This was a direct result of a small outage experienced on a weekend.
We diagnosed that under certain circumstances certain indexes in the database would not perform well. In some cases it didn’t matter what the percentage of fragmentation was, queries would just be slow.
We built an automated process that would automate the rebuilding and reorganization of indexes based up fragmentation levels. This job would scan all indexes in the database on a daily basis and queue up the SQL operations in off hours.
On a weekly basis certain indexes, those that would degrade performance regardless of fragmentation level, were automatically rebuilt.
We also had historical tracking of when the indexes were rebuild and what fragmentation level they were at when rebuild job was queued up.