Active Query Diagnosis and Runtime Profiling

Capturing active work and short-term runtime evidence during a problem.

25 associated posts23 primary posts

[Video] Office Hours: Ask Me Anything About SQL Server at the Volcano Hekla

I drove up the volcano Hekla in central Iceland - also known as the Gateway to Hell - and parked the Defender here:

While my travel companions hiked up higher (and took that photo), I set up the tripod and camera, then went through your highly-upvoted questions from https://pollgab.com/room/brento.

Read more about [Video] Office Hours: Ask Me Anything About SQL Server at the Volcano Hekla 2 comments — Join the discussion

How to Trace a Nested Stored Procedure Without Using Profiler

You've got a stored procedure that calls other stored procedures that build dynamic SQL that call other functions, and there's so much calling going on that you would like to phone a friend.

Your query plans look like piles of spaghetti, and when you zoom in, you just see more tiny piles of tiny spaghetti.

Read more about How to Trace a Nested Stored Procedure Without Using Profiler 5 comments — Join the discussion
Performance Tuning

SQL Server 2017 CU3 adds tempdb spill diagnostics in DMVs and Extended Events

Where have you been all my life?
Whenever I'm teaching people about query tuning, two things come up almost without fail: parameter sniffing and tempdb spills.

They're not mutually exclusive -- some queries will seemingly always spill to tempdb, whether parameter sniffing is present of not, and some queries experiencing issues with parameter sniffing will never spill to tempdb.

Read more about SQL Server 2017 CU3 adds tempdb spill diagnostics in DMVs and Extended Events 4 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

SQL Interview Question: “Tell me what you see in this screenshot.”

You're a data professional working with (or at least applying to work with) a company using the StackOverflow database (I'm using the March 2016 version today). Your users are complaining that this stored procedure is slow:

They didn't give you parameter 26837 - I'm just giving you that so you can see an execution plan.

Read more about SQL Interview Question: “Tell me what you see in this screenshot.” 83 comments — Join the discussion