Monday, 15 July 2019

MSSQL Index Rebuild Simplified Guide


This guide is designed to do a full index rebuild and must be done out of hours as it will take the indexes offline meaning queries won’t be able to use them when searching for data 

  • Create a new maintenance plan and call it something relevant like ‘IndexRebuild 
  • In the maintenance plan, drag the task from the toolbox on the right ‘Rebuild Index Task’ into the white space in the bottom middle pane 

  • Right click and edit this 

  • Leave the connection as ’Local server connection’  

  • Dropdown the Database(s) box and select the database/databases you want to rebuild the indexs for (choose the databases actually doing the work)

  • Leave everything else as default 

  • Click the calendar icon to the right of Subplan_1 – Not scheduled (On Demand) and select the time and frequency you want this to run 

  • Now close this and save 

Note: You can run a reorganise task instead which is an online task meaning that it can be done whenever. This is the way to go if a system is heavily used 24/7. To set this up instead, just drag the Reorganise Index Task box into the maintenance plan instead. The settings are very similar, just set the databases you want to point it at. 

No comments:

Post a Comment