Gouache painting of a row of glass jars of rainwater on a porch rail, one with a vermilion lid

Wait Stats Collection Script for Current SQL Server Versions

A wait stats collection script saves snapshots of sys.dm_os_wait_stats into a table, so you can compare two snapshots instead of reading totals since the last restart. This post builds the tables and a snapshot procedure, creates a small load, and reports the change with a category for each wait. It also covers idle waits, restarts and retention.

Read More