Make sure you manage Microsoft SQL Server to optimize performance.
To ensure that your performance doesn’t degrade, it’s useful to carry out the following weekly maintenance operations on your SQL server, especially in repositories with a high transaction count and frequency:
-
Recompute statistics by running the command:
EXEC sp_updatestats
-
Clear the buffers by running the command:
DBCC DROPCLEANBUFFERS
-
Clear the cache by running the command:
DBCC FREEPROCCACHE
-
Run an index fragmentation check and also:
- Rebuild anything that’s >30% fragmented
- Reorganize anything that’s between 5% and 30% fragmented