Closed aroques closed 7 months ago
It does. Do a search in the code for "over the last" and you'll see the relevant portions:
'For ' + CAST(((wNow.wait_time_ms - COALESCE(wBase.wait_time_ms,0)) / 1000) AS NVARCHAR(100)) + ' seconds over the last ' + CASE @Seconds WHEN 0 THEN (CAST(DATEDIFF(dd,@StartSampleTime,@FinishSampleTime) AS NVARCHAR(10)) + ' days') ELSE (CAST(@Seconds AS NVARCHAR(10)) + ' seconds') END + ', SQL Server was waiting on this particular bottleneck.' + @LineFeed + @LineFeed AS Details,
If you believe that's incorrect, can you send a screenshot that includes these 3 things:
Exact parameters are none so they are defaulted.
@Seconds
defaults to 5 so the 0 seconds case does not get hit.
The result set and duration are shown in the first screenshot, but here's a complete screenshot of sp_BlitzFirst
with defaulted parameters (@Seconds
is 5) waiting 12.5 minutes:
HAHAHA, twelve minutes, good Lord, that's bad. OK, cool, I'll reopen this and get that in, heh.
Fixed! Here's a screenshot showing the server under load.
Version of the script Look in the stored procedure, and it'll have a version date & number near the top. Put that in here. If it's not the current version (dated in the last month), then upgrade to the current version and test that before reporting a bug - we fix a lot of stuff in each new build. We'll flat out close bug reports for older builds.
What is the current behavior? This
Details
of the Wait Stats finding displays the@Seconds
variable for how long that the server spent waiting on a particular wait (the default is 5 as shown below):If the current behavior is a bug, please provide the steps to reproduce. Run
sp_BlitzFirst
on a server busy enough that it takes longer than@Seconds
to run.What is the expected behavior? This
Details
of the Wait Stats finding should display the number of seconds that it actually spent waiting which in the above example is 122 seconds.Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures? Product: Microsoft SQL Server Enterprise: Core-based Licensing (64-bit) Operating System: Windows Server 2016 Standard (10.0) Version: 14.0.3465.1