How To: Reindex databases on different schedules
Create a new job for each different schedule you require for index maintenance. Let us take a simple example:
- Perform index rebuilds on [YourDatabase] Friday night at 11pm
- Perform index rebuilds on all other databases on Saturday night at 10pm
- Perform index reorganization on all databases Sunday through Thursdays at 10pm.
To achieve this using the default installed Minion Reindex jobs:
- Connect to "YourServer" and expand the SQL Agent node. You’ll see two new jobs:
- MinionReindexDBs-All-All – Runs once weekly – Fridays at 3:00 AM - to thoroughly defragment indexes (rebuild).
- MinionReindexDBs-All-REORG – Runs Daily – 3:00 AM except for Friday – to complete lightweight defragmenting (reorganize).
- Edit the "MinionReindexDBs-All-All" job:
- Edit the "Reindex" step: add ‘YourDatabase’ to the @Exclude parameter.
- Edit the schedule to run Friday night at 11pm.
- Create a new job "MinionReindexDBs-YourDatabase-All".
- Create a "Reindex" step similar to that in the "MinionReindexDBs-All-All" job. Set @Include to ‘YourDatabase’, and set @Exclude to NULL.
- Schedule it to run Saturday night at 10pm.
- Edit the schedules for the job "MinionReindexDBs-All-REORG" to run Sunday through Thursday at 10pm.