Create maintenance plan for reindexing
Defragmentation of the database indices is fundamental for the performance of the database. To do this, create a maintenance plan in Microsoft SQL Management Studio using the Maintenance Planning Wizard.
Instructions:
-
Enter a name for the maintenance plan and click Change... to create a schedule:
-
Set the frequency to Daily and the time so that it does not clash with any other job:
-
Click on OK and then on Next
-
In the next dialog, select the Create new maintenance task index:
-
Click on Next
-
Select the databases to be defragmented. Depending on the MSSQL Server version, filters are active in this window. For example, the job is only executed from 30% fragmentation. Deactivate all filters here so that the job is always executed at the specified time.
-
Click on Next
-
In the last step, select a directory to which the log files are to be written
-
Click on Finish
-
Run the job manually once to check