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
Gouache painting of a crowded seed tray splitting into two trays with one seedling pot painted red

Measure Page Splits in SQL Server With T-SQL

To measure page splits in SQL Server, read the Page Splits/sec counter twice and subtract the first reading from the second. This post loads a table with sequential keys and another with random keys, so you can see which splits are normal and which cost you. It also names the index behind the splits and shows how a lower fill factor removes most of them.

Read More