Performance

9 posts
Red Flags in Your Query (T-SQL Tuesday #200)

Red Flags in Your Query (T-SQL Tuesday #200)

When I'm looking at a query, I bet it's bad if I see... a shopping list of red flags I've learned to spot, from AI-generated code to SSMS map mode gut checks.

T-SQL Tuesday 8 min read Performance
Async stats update causing blocking

Async stats update causing blocking

An index rebuild quietly blocked an async stats update, and the whole server started timing out. Here is the lock-partitioning repro and the SQL Server 2022 fix.

Deep Dive 9 min read Blocking · Debugging
Measuring the Scalar UDF Performance Cost

Measuring the Scalar UDF Performance Cost

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
How Scalar Functions Prevent Parallelism

How Scalar Functions Prevent 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
KEEP PLAN Demystified

KEEP PLAN Demystified

Ever wondered what the KEEP PLAN hint actually does? The docs are vague, so I tested it against every recompilation threshold to find out.

Deep Dive 16 min read Extended Events · Performance
Query Store default settings

Query Store default settings

Query Store comes with default settings - but are they what the documentation says? Let's find out using a simple Extended Events session.

Deep Dive 4 min read Query Store · Extended Events
Generate XML documents efficiently

Generate XML documents efficiently

Believe it or not, there is a wrong and correct way when it comes to generating XML documents in SQL.

How to 4 min read XML · Performance