WSUS Database Tune-Up

WSUS running slow? It is likely database speed. Once WSUS has been up and running for awhile it can slow down with the number of patches and computers growing on a regular basis. Oddly WSUS creates its database without indexes, and as such offers no way to rebuild those missing indexes. What are database indexes? Its like a table of contents or a glossary on a book. Can you imagine how long it would take to find information in a book without a reference? Database indexes are that reference and if we build them (and rebuild them) looking up data will be considerably faster. Luckily Microsoft has provided a SQL script for building (and rebuilding) indexes on the WSUS database.

The WSUS Database Tune-Up consists of two files; the Microsoft SQL script and a PowerShell script to run it. All that needs to be done is to download WSUS Database Tune-Up, extract both files to the same directory and run the PS1 file in an administrative session.The PS1 file should be run on a regular basis to rebuild the indexes as the data changes. In most environments this could be done as a weekend job as a scheduled task.

NOTE: The default in the script uses the Windows Internal Database (WID) and if SQL is used instead then the $SQLServer variable needs to be changed in the script to reflect the name of your SQL server.

DOWNLOAD WSUS Database Tune-Up