Live registration reopens October 1, 2026, in 2d 19h 26m — Notify me

Category: Development

Automatic Stats Updates Don’t Always Invalidate Cached Plans

Normally, when SQL Server updates statistics on an object, it invalidates the cached plans that rely on that statistic as well. That's why you'll see recompiles happen after stats updates: SQL Server knows the stats have changed, so it's a good time to build new execution plans based on the changes in the data.

However, updates to system-created stats don't necessarily cause plan recompiles.

Read more about Automatic Stats Updates Don’t Always Invalidate Cached Plans 9 comments — Join the discussion

Should There Be Ads in SSMS?

Some folks are seeing an ad at the top of their SSMS v22, like this one reported in the feedback site:

Today, Microsoft's using this to test ads for an upcoming conference. Interesting that they give deeper discounts to Reddit readers as opposed to SSMS users, but I digress. Tomorrow, they might be pushing SQL Server 2025 upgrades, or Microsoft Fabric, or Copilot, or whatever.

Read more about Should There Be Ads in SSMS? 44 comments — Join the discussion
T-SQL & Development

Update: SQL Server 2025’s REGEX Performance Isn’t So Bad!

Back in March 2025 when Microsoft first announced that REGEX support was coming to SQL Server 2025 and Azure SQL DB, I gave it a quick test, and the performance was horrific. It was bad in 3 different ways:

The CPU usage was terrible, burning 60 seconds of CPU time to check a few million rows
It refused to use an index
The cardinality estimation was terrible, hard-coded to 30% of the table

Read more about Update: SQL Server 2025’s REGEX Performance Isn’t So Bad! 14 comments — Join the discussion
Performance Tuning

Query Plan Pop Quiz Answers 2 and 3: I’ve Got Good News and Bad News.

In the Query Plan Pop Quiz, questions 2 and 3 asked you about what the sizes of arrows on query plans meant. The good news is that almost all of you got Question 2 right, but the bad news is that the vast majority of you got Question 3 completely incorrect, and the saddest part of that is that you've been using that inaccurate knowledge to guide your query tuning - and wasting your time.

Read more about Query Plan Pop Quiz Answers 2 and 3: I’ve Got Good News and Bad News. 5 comments — Join the discussion
Performance Tuning

Query Plans Pop Quiz Answer #1: Costs are Garbage.

In last week's Query Plans Pop Quiz, the first question was, someone hands you these two queries and you get their estimated plans to decide which query to tune. Perhaps you get the estimated plans from SSMS, or from sp_BlitzCache, or from your monitoring tool. The question was, which query should you focus on tuning?…

Read more about Query Plans Pop Quiz Answer #1: Costs are Garbage. 4 comments — Join the discussion

SSMS v22 Query Hint Recommendation Tool: The Invasion of the Query Hints

SQL Server Management Studio 22 Preview 3 is out, and it brings with it a new Query Hint Recommendation tool. Start by highlighting the query you want to test, then click Tools, Query Hint Recommendation Tool. It slides out a new pane on the right hand side: The maximum tuning time defaults to 300 seconds,…

Read more about SSMS v22 Query Hint Recommendation Tool: The Invasion of the Query Hints 24 comments — Join the discussion
Performance Tuning

Query Plans Pop Quiz: Three Simple Questions

Question 1: Pick the Problematic Plan: someone hands you a pair of queries, and you get the estimated query plans. (Perhaps you get the estimated plans from SSMS, or from sp_BlitzCache, or from your monitoring tool.) Which one of these two should you focus on tuning first, Query 1 or Query 2?

Question 2: on an estimated plan, what does the thickness of the colored arrow represent?

Read more about Query Plans Pop Quiz: Three Simple Questions 28 comments — Join the discussion
T-SQL & Development

The Query Tuning Trick You Should Use More: Pagination

When I'm tuning queries, the normal answer is to make the query perform better - either via changing the T-SQL, adding hints, or adding indexes so that the data's better prepared for the query.

However, sometimes when I'm looking at the output of sp_BlitzCache, I scroll across to the Average Rows column and double-check that the query's actually returning a reasonable number of rows out in the wild.

Read more about The Query Tuning Trick You Should Use More: Pagination 6 comments — Join the discussion
T-SQL & Development

Mastering Class Updates on Resource_Semaphore, The Ascending Key Problem, and The Cloud

I've posted a couple of updated videos to my Mastering courses.

In Mastering Server Tuning, I updated and expanded the RESOURCE_SEMAPHORE module to cover more details about query workspace grants, plus cover SQL Server 2022's updates to Adaptive Memory Grants.

Read more about Mastering Class Updates on Resource_Semaphore, The Ascending Key Problem, and The Cloud 2 comments — Join the discussion

Review: SSMS Copilot vs Other AI Tools

I use AI tools constantly in my work, so when the new SSMS v21 came out with Copilot support, I was excited to try it. The short story is that the user interface is fine, and it doesn't feel buggy, but the advice is simply terrible compared to other LLMs due to the prompt Copilot is using. You're better off using tools like ChatGPT, Gemini, and Claude directly for now.

Read more about Review: SSMS Copilot vs Other AI Tools 25 comments — Join the discussion