SQL Server, from production

Tips, tutorials and insights for database professionals — mostly performance. Why a query that was fine last quarter isn’t any more, and what to actually do about it.

Most writing about SQL Server performance comes from consultants who see a system for two weeks. I see the same databases for years. That turns out to be a different problem: the plan that regressed quietly after an upgrade, the index that was correct two years ago and is now just write overhead, the maintenance job that was fine until the table got big.

Every post ships with a script you can run. If a claim here can’t be reproduced on a public sample database — StackOverflow, WideWorldImporters, AdventureWorks — it doesn’t get published.

Free tool

T-SQL formatterPaste unreadable T-SQL, pick your keyword casing and indent, get it back readable. It formats in the browser — the SQL never reaches a server, which matters when the query has a customer’s name in it.Format some SQL →

In the works

Each of these lands with a reproduction script that runs on a public sample database. Follow along via RSS.