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.
Best practices
What holds up on a database that has to keep running for years, not just in a demo.
Query tips
Plans, estimates and predicates — why the optimiser chose that, and what to do about it.
Performance
Finding the regression, proving it, and fixing the cause rather than the symptom.
Reliability
Indexing, maintenance and upgrades that do not quietly become tomorrow’s incident.
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
- Tutorial
What the Cardinality Estimator upgrade actually changed
The most common cause of “we upgraded and everything got slower”. Reproducible by changing only the compatibility level.
- Deep dive
The plan that was fine until it wasn’t
Parameter sniffing explained for a database that ran happily for two years before it bit.
- Tutorial
Using Query Store to find out what actually changed
Diagnostic queries against the Query Store views directly, not the built-in reports — plus the traps.
- Insight
Pointing an LLM agent at SQL Server diagnostics safely
Read-only by construction, what context to give it, and an honest catalogue of what it gets wrong.
Each of these lands with a reproduction script that runs on a public sample database. Follow along via RSS.
