SQL-Server-First-Responder-Kit
SQL-Server-First-Responder-Kit copied to clipboard
sp_BlitzQueryStore prints 'Gathering highest log byte use plans' twice
Version of the script
@Version = '8.19', @VersionDate = '20240222';
What is the current behavior? 'Gathering highest log byte use plans' prints twice. You can see this on line 2186 and line 2234.
If the current behavior is a bug, please provide the steps to reproduce.
Run the procedure with a @DatabaseName
that supports the 2017 columns.
What is the expected behavior? It should either only print once or it should print two different messages.
Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures? This isn't a SQL version or OS issue. It's a copy and paste error.
Other Details I'm quite willing to fix this myself, but there's a question around what the fix should be. There are two obvious fixes:
- Just delete one of the
RAISERROR
lines - Correct the
RAISERROR
that claims that it's checking for the "highest" when it's actually looking for the average.
Option two is both my preference and deeper than it looks. For consistency, if this pattern check has two distinct messages (one for "average" and one for "highest"), then we would need to include similar messages for all of the patterns that also check for "average" and "highest". By my count, that's seven more RAISERROR
calls. We do seventeen pattern checks, but only print ten relevant messages. The seven categories with missing messages are: Duration, CPU, logical reads, physical reads, writes, memory use, and tempdb use. While we're at it, advertising in the documentation that we're checking seventeen patterns seems like a good idea. The docs currently read as if only nine are being done.
Again, I'm willing to do this myself. I just want some input on if we want option one or two.