Live registration reopens October 1, 2026, in 13d 14h 29mNotify me

Category: First Responder Kit

Writing Diagnostic Queries is Hard Because SQL Server Still Has (Tiny) Bugs.

When I first got started working with SQL Server, I assumed it was flawless because it came in a sealed box from a ginormous corporation. I figured they'd tested every edge case, and that there was no way things were gonna go sideways. These days, even though I read CU KB articles and giggle about…

Read more about Writing Diagnostic Queries is Hard Because SQL Server Still Has (Tiny) Bugs. 15 comments — Join the discussion
Performance Tuning

DBA Training Plan 12: What Query Plans Are In Cache?

In the last episode, while talking about the basics of executing queries, I said that SQL Server caches execution plans in memory, reusing them whenever the same query gets executed again. I've also talked about the dynamic management views (DMVs) that let you query what's in SQL Server's memory. Let's put those two things together and find out what queries have been running on the server lately.

Read more about DBA Training Plan 12: What Query Plans Are In Cache? 5 comments — Join the discussion
Performance Tuning

How Should We Show Statistics Histograms in sp_BlitzIndex?

If you're a graduate of my free How to Think Like the SQL Server Engine course - and you'd better be, dear reader - then you're vaguely familiar with DBCC SHOW_STATISTICS. It's a command that shows you the contents of a statistics histogram. When I'm doing the first two parts of the D.E.A.T.H. Method - (D)eduplicating identical…

Read more about How Should We Show Statistics Histograms in sp_BlitzIndex? 4 comments — Join the discussion

How to Troubleshoot Blocking and Deadlocking with Scripts and Tools

When you need to find which queries are blocking other queries, your decision comes down to when the blocking happened. Is it happening now, recently, or coming up soon? During a live emergency, start with sp_WhoIsActive. Adam Machanic's excellent free sp_WhoIsActive replaces Activity Monitor, sp_who, and sp_who2, and it's way more powerful. The documentation is extensive -…

Read more about How to Troubleshoot Blocking and Deadlocking with Scripts and Tools 2 comments — Join the discussion

How to Fix sp_BlitzIndex Aggressive Indexes Warnings

sp_BlitzIndex gives your indexes a psychiatrist-style evaluation. It's a lot like a real psychiatrist: it's just flagging behaviors, and there's not necessarily anything wrong with being a hoarder, or a workaholic, or a furry. They're just behavioral traits. Let your freak flag fly. One of the warnings is "Aggressive Indexes," which means sys.dm_db_operational_stats reports minutes of…

Read more about How to Fix sp_BlitzIndex Aggressive Indexes Warnings 14 comments — Join the discussion

How to Track SQL Server Changes with sp_BlitzFirst

In the First Responder Kit's Power BI Dashboard, there's a Quick Diagnosis results area where sp_BlitzFirst takes a guess at why your SQL Server was slow - or in this case, why it suddenly got faster:

In this case, wait times were bad, and then all of a sudden the wait times just disappeared, and the line graph for Batch Requests/sec takes off. We're doing way more queries, but waiting less times. Why?

Read more about How to Track SQL Server Changes with sp_BlitzFirst 6 comments — Join the discussion
Performance Tuning

How to Get Live Query Plans with sp_BlitzWho

sp_BlitzWho is our open source replacement for sp_who and sp_who2. It has all kinds of really neat-o outputs like how many degrees of parallelism the query is using, how much memory it's been granted, how long it's been waiting for memory grants, and much more.

If you're on SQL Server 2016 SP1 or newer, it can show you a query's live execution plan from sys.dm_exec_query_statistics_xml.

Read more about How to Get Live Query Plans with sp_BlitzWho 4 comments — Join the discussion
Performance Tuning

How to Log Wait Stats to Table with sp_BlitzFirst

When you're analyzing SQL Server performance, one of the best places to start is wait stats. What's your SQL Server waiting on?

sp_BlitzFirst makes it really easy to trend this data over time for free with all currently supported versions of SQL Server (2008+). Just set up an Agent job to run this every 15 minutes:
[crayon-6aabb332e59a8680411509/]

Read more about How to Log Wait Stats to Table with sp_BlitzFirst 29 comments — Join the discussion

How to Do a Free SQL Server Performance Check

Your client or boss just said, "Find out why this SQL Server is slow." You've already done a free SQL Server health check, and now you wanna investigate deeper.
Step 1: Download & run sp_BlitzFirst.
Start with wait stats, which tell you what the SQL Server has been waiting on since the service was last started, or since someone cleared wait stats with DBCC SQLPERF, whichever is more recent.

Read more about How to Do a Free SQL Server Performance Check 9 comments — Join the discussion