Notes from a TSQL trench

Database stuff,
with a side of memes.

Long-form notes on TSQL performance, Extended Events, Query Store and the tooling around them. Written from the trenches, not the slide deck.

60 posts 4 series 108+ memes
My Toolbox - Greenshot

My Toolbox - Greenshot

Print Screen and Paint never cut it for me. Greenshot did: precise region capture, a real annotation editor, obfuscation, and one-key sharing. Here's the tour.

Tools 3 min read Productivity
Scary Scalar Functions - Part Three: The Cure

Scary Scalar Functions - Part Three: The Cure

Nuke them from orbit, or inline them. The practical ways to neutralize Scalar UDF performance pain, from a free SCHEMABINDING win to a full ITVF rewrite.

Deep Dive 11 min read Performance · Parallelism
What's in a name? (T-SQL Tuesday #152)

What's in a name? (T-SQL Tuesday #152)

My T-SQL Tuesday rant: an app that connects as '.Net SqlClient Data Provider' turns debugging into a manhunt. Please, name your apps.

T-SQL Tuesday 2 min read Debugging · Extended Events
Scary Scalar Functions - Part Two: Performance

Scary Scalar Functions - Part Two: Performance

A Scalar function that does literally nothing still runs over 20 times slower. Here is the proof, measured four different ways.

Deep Dive 8 min read Performance · Query Store
What is causing my constraint to be untrusted?

What is causing my constraint to be untrusted?

You fix an untrusted constraint, and by morning it's back to untrusted. Here's how to catch the process responsible, using Extended Events.

Investigation 7 min read Extended Events · Debugging
Scary Scalar Functions - Part One: Parallelism

Scary Scalar Functions - Part One: Parallelism

Consultants hate me for this one weird trick. Because I'll be uncovering all the mess Scalar functions can cause in a series of articles.

Deep Dive 6 min read Performance · SQL Server 2022