Black Friday prices end in 19d 16h 32m — See the sale

Author: Brent Ozar

I make Microsoft SQL Server go faster. I love teaching, travel, cars, and laughing. I'm based out of Las Vegas. He/him.
Production DBA

Let’s Build a Better KILL. What Do We Need to Consider?

When there's a performance emergency, a lot of us perform the same manual tasks over and over. We run sp_BlitzWho or sp_WhoIsActive, look for blocking, long-running or out-of-control queries, and kill them. I'm going to build a new sp_kill for the First Responder Kit to make that easier, faster, and safer, and I want your…

Read more about Let’s Build a Better KILL. What Do We Need to Consider? 62 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

Updated First Responder Kit and Consultant Toolkit for November 2025

This quarter's release includes new checks for SQL Server 2025's new memory pressure warnings, Azure SQL DB's operations in progress, accurate CPU usage on Docker containers, warnings about not using partitioned statistics where appropriate, and much more. If you'd like to thank me for my work in maintaining the First Responder Kit, the best way…

Read more about Updated First Responder Kit and Consultant Toolkit for November 2025 Be the first to comment

SQL Server 2025 Is Out, and Standard Goes Up to 256GB RAM, 32 Cores!

Today marks the official birthday of Microsoft SQL Server 2025. Here's where to download the evaluation version. Here are the top things you wanna consider as you talk to your managers, developers, and end users. The feature differences between 2025 Enterprise and Standard have been revealed, and the news for Standard Edition folks is spectacular:…

Read more about SQL Server 2025 Is Out, and Standard Goes Up to 256GB RAM, 32 Cores! 35 comments — Join the discussion

How to Query JSON Data Quickly in SQL Server, Part 2: SQL Server 2025

SQL Server 2025 and .NET 10 bring several new improvements to storing JSON natively in the database and querying it quickly. On the SQL Server 2025 side, the two big ones are the new native JSON indexes and the new JSON_CONTAINS function. Let's see their improvements in action. On the .NET 10 side, EF 10…

Read more about How to Query JSON Data Quickly in SQL Server, Part 2: SQL Server 2025 12 comments — Join the discussion
Performance Tuning

How to Query JSON Data Quickly in SQL Server, Part 1: Pre-2025

Before SQL Server 2025, if you want to store JSON data in Microsoft SQL Server or Azure SQL DB, and you want fast queries, the easiest way is to:

Store the data in an NVARCHAR(MAX) column (because the native JSON datatype didn't arrive until SQL Server 2025)
Add a computed column for the specific JSON keys we'll want to query quickly
Index those keys
Query it using the JSON_VALUE function

Read more about How to Query JSON Data Quickly in SQL Server, Part 1: Pre-2025 12 comments — Join the discussion

SQL ConstantCare® Population Report: Fall 2025

In this quarter's update of our SQL ConstantCare® population report, showing how quickly (or slowly) folks adopt new versions of SQL Server, the data is very similar to last quarter:

SQL Server 2025: exactly 1 server being monitored, heh. God bless y'all for giving it a shot this early.
SQL Server 2022: 25%, up from 24% last quarter
SQL Server 2019: 43%, was 45%
SQL Server 2017: 10%, was 11%
SQL Server 2016: 13%, was 12%
SQL Server 2014: 5%, same as last quarter
SQL Server 2012 & prior: 1%, same
Azure SQL DB and Managed Instances: 2%, same

Read more about SQL ConstantCare® Population Report: Fall 2025 5 comments — Join the discussion
Performance Tuning

The Version Store Won’t Clear If ANY Database Has Open Transactions.

Short story: what the title says.

This is especially problematic for folks who merge multiple databases onto the same server. All it takes is one badly-behaving application to leave its transactions open, and suddenly it causes the rest of the databases to run TempDB out of space. That app's transaction might not even be changing anything, and it might have never caused problems for that application before - but once it shares a TempDB with other apps, it causes cascading problems.

Read more about The Version Store Won’t Clear If ANY Database Has Open Transactions. 11 comments — Join the discussion