Skip to content

Commit 17442df

Browse files
authored
Merge pull request #2706 from alihacks/documentation-cleanup
Documentation updates
2 parents 2370daa + 075461d commit 17442df

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

Documentation/sp_BlitzCache_Checks_by_Priority.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ If you want to add a new check, start at 70
1313
|----------|---------------------------------|---------------------------------------|-------------------------------------------------|----------|-------------|
1414
| 10 | Execution Plans | Forced Serialization | http://www.brentozar.com/blitzcache/forced-serialization/ | 25 | No |
1515
| 10 | Large USERSTORE_TOKENPERM cache | Using Over 10% of the Buffer Pool | https://brentozar.com/go/userstore | 69 | No |
16+
| 50 | Complexity | High Compile CPU | https://www.brentozar.com/blitzcache/high-compilers/ | 64 | No |
17+
| 50 | Complexity | High Compile Memory | https://www.brentozar.com/blitzcache/high-compilers/ | 65 | No |
1618
| 50 | Execution Plans | Compilation timeout | http://brentozar.com/blitzcache/compilation-timeout/ | 18 | No |
1719
| 50 | Execution Plans | Compile Memory Limit Exceeded | http://brentozar.com/blitzcache/compile-memory-limit-exceeded/ | 19 | No |
1820
| 50 | Execution Plans | No join predicate | http://brentozar.com/blitzcache/no-join-predicate/ | 20 | No |
@@ -28,6 +30,7 @@ If you want to add a new check, start at 70
2830
| 50 | Performance | Long Running Query | http://brentozar.com/blitzcache/long-running-queries/ | 9 | No |
2931
| 50 | Performance | Missing Indexes | http://brentozar.com/blitzcache/missing-index-request/ | 10 | No |
3032
| 50 | Selects w/ Writes | Read queries are causing writes | https://dba.stackexchange.com/questions/191825/ | 66 | No |
33+
| 100 | Complexity | Long Compile Time | https://www.brentozar.com/blitzcache/high-compilers/ | No |
3134
| 100 | Complexity | Many to Many Merge | Blog not published yet | 61 | Yes |
3235
| 100 | Complexity | Row Estimate Mismatch | https://www.brentozar.com/blitzcache/bad-estimates/ | 56 | Yes |
3336
| 100 | Compute Scalar That References A CLR Function | Calls CLR Functions | https://www.brentozar.com/blitzcache/compute-scalar-functions/| 31 | Yes |
@@ -75,7 +78,7 @@ If you want to add a new check, start at 70
7578
| 200 | Execution Plans | Nearly Parallel | http://brentozar.com/blitzcache/query-cost-near-cost-threshold-parallelism/ | 7 | No |
7679
| 200 | Execution Plans | Parallel | http://brentozar.com/blitzcache/parallel-plans-detected/ | 6 | No |
7780
| 200 | Indexes | Backwards Scans | https://www.brentozar.com/blitzcache/backwards-scans/ | 38 | Yes |
78-
| 200 | Is Paul White Electric? | This query has a Switch operator in it! | https://www.sql.kiwi/2013/06/hello-operator-my-switch-is-bored.html | 998 | Yes |
81+
| 200 | Is Paul White Electric? | This query has a Switch operator in it! | https://www.sql.kiwi/2013/06/hello-operator-my-switch-is-bored.html | 57 | Yes |
7982
| 200 | Trace Flags | Session Level Trace Flags Enabled | https://www.brentozar.com/blitz/trace-flags-enabled-globally/ | 29 | No |
8083
| 254 | Plan Cache Information | Breaks cache down by creation date (24/4/1 hrs) | None | 999 | No |
8184
| 255 | Global Trace Flags Enabled | You have Global Trace Flags enabled on your server | https://www.brentozar.com/blitz/trace-flags-enabled-globally/ | 1000 | No |

Documentation/sp_BlitzFirst_Checks_by_Priority.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ If you want to add a new check, start at 47
2525
| 1 | SQL Server Internal Maintenance | Log File Shrinking | https://BrentOzar.com/go/logsize | 14 |
2626
| 10 | Server Performance | Poison Wait Detected | https://BrentOzar.com/go/poison | 30 |
2727
| 10 | Server Performance | Target Memory Lower Than Max | https://BrentOzar.com/go/target | 35 |
28+
| 10 | Azure Performance | Database is Maxed Out | https://BrentOzar.com/go/maxedout | 41 |
2829
| 40 | Table Problems | Forwarded Fetches/Sec High | https://BrentOzar.com/go/fetch | 29 |
2930
| 50 | In-Memory OLTP | Garbage Collection in Progress | https://BrentOzar.com/go/garbage | 31 |
3031
| 50 | Query Problems | Compilations/Sec High | https://BrentOzar.com/go/compile | 15 |

Documentation/sp_Blitz_Checks_by_Priority.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ If you want to add a new one, start at 257.
1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
1414
| 0 | Outdated sp_Blitz | sp_Blitz is Over 6 Months Old | https://www.BrentOzar.com/blitz/ | 155 |
15+
| 0 | Informational | @CheckUserDatabaseObjects Disabled | https://www.BrentOzar.com/blitz/ | 201 |
1516
| 0 | Informational | @CheckUserDatabaseObjects Disabled | https://www.BrentOzar.com/blitz/ | 204 |
1617
| 0 | Informational | Some Checks Skipped | https://www.BrentOzar.com/blitz/ | 223 |
1718
| 1 | Backup | Backing Up to Same Drive Where Databases Reside | https://www.BrentOzar.com/go/backup | 93 |
@@ -39,10 +40,10 @@ If you want to add a new one, start at 257.
3940
| 10 | Performance | DBCC DROPCLEANBUFFERS Ran Recently | https://www.BrentOzar.com/go/dbcc | 207 |
4041
| 10 | Performance | DBCC FREEPROCCACHE Ran Recently | https://www.BrentOzar.com/go/dbcc | 208 |
4142
| 10 | Performance | DBCC SHRINK% Ran Recently | https://www.BrentOzar.com/go/dbcc | 210 |
42-
| 10 | Performance | DBCC WRITEPAGE Used Recently | https://www.BrentOzar.com/go/dbcc | 209 |
4343
| 10 | Performance | High Memory Use for In-Memory OLTP (Hekaton) | https://www.BrentOzar.com/go/hekaton | 145 |
4444
| 10 | Performance | Memory Nodes Offline | https://www.BrentOzar.com/go/schedulers | 110 |
4545
| 10 | Performance | Plan Cache Erased Recently | https://www.BrentOzar.com/askbrent/plan-cache-erased-recently/ | 125 |
46+
| 10 | Reliability | DBCC WRITEPAGE Used Recently | https://www.BrentOzar.com/go/dbcc | 209 |
4647
| 10 | Reliability | Server restarted in last 24 hours | | 221 |
4748
| 20 | Reliability | Dangerous Build of SQL Server (Corruption) | http://sqlperformance.com/2014/06/sql-indexes/hotfix-sql-2012-rebuilds | 129 |
4849
| 20 | Reliability | Dangerous Build of SQL Server (Security) | https://technet.microsoft.com/en-us/library/security/MS14-044 | 157 |
@@ -63,7 +64,6 @@ If you want to add a new one, start at 257.
6364
| 50 | Performance | Snapshotting Too Many Databases | https://www.BrentOzar.com/go/toomanysnaps | 236 |
6465
| 50 | Performance | Too Much Free Memory | https://www.BrentOzar.com/go/freememory | 165 |
6566
| 50 | Performance | Wait Stats Cleared Recently| | 205 |
66-
| 50 | Reliability | DBCC WRITEPAGE Used Recently | https://www.BrentOzar.com/go/dbcc | 209 |
6767
| 50 | Reliability | Full Text Indexes Not Updating | https://www.BrentOzar.com/go/fulltext | 113 |
6868
| 50 | Reliability | Page Verification Not Optimal | https://www.BrentOzar.com/go/torn | 14 |
6969
| 50 | Reliability | Possibly Broken Log Shipping | https://www.BrentOzar.com/go/shipping | 111 |
@@ -135,15 +135,13 @@ If you want to add a new one, start at 257.
135135
| 170 | Reliability | Errors Logged Recently in the Default Trace | https://www.BrentOzar.com/go/defaulttrace | 150 |
136136
| 170 | Reliability | Max File Size Set | https://www.BrentOzar.com/go/maxsize | 80 |
137137
| 170 | Reliability | Remote Admin Connections Disabled | https://www.BrentOzar.com/go/dac | 100 |
138-
| 200 | Backup | Backing Up Unneeded Database | https://www.BrentOzar.com/go/reportservertempdb | 127 |
139138
| 200 | Backup | MSDB Backup History Not Purged | https://www.BrentOzar.com/go/history | 3 |
140139
| 200 | Backup | MSDB Backup History Purged Too Frequently | https://www.BrentOzar.com/go/history | 186 |
141140
| 200 | Informational | @@Servername not set | https://www.BrentOzar.com/go/servername | 70 |
142141
| 200 | Informational | Agent Jobs Starting Simultaneously | https://www.BrentOzar.com/go/busyagent | 123 |
143142
| 200 | Informational | Backup Compression Default Off | https://www.BrentOzar.com/go/backup | 116 |
144143
| 200 | Informational | Cluster Node | https://www.BrentOzar.com/go/node | 53 |
145144
| 200 | Informational | Collation different than tempdb | https://www.BrentOzar.com/go/collate | 76 |
146-
| 200 | Informational | Database Collation Mismatch | https://www.BrentOzar.com/go/collate | 58 |
147145
| 200 | Informational | Database Encrypted | https://www.BrentOzar.com/go/tde | 21 |
148146
| 200 | Informational | Date Correlation On | https://www.BrentOzar.com/go/corr | 20 |
149147
| 200 | Informational | Linked Server Configured | https://www.BrentOzar.com/go/link | 49 |
@@ -258,7 +256,6 @@ If you want to add a new one, start at 257.
258256
| 210 | Non-Default Database Config | Delayed Durability Enabled | https://www.BrentOzar.com/go/dbdefaults | 143 |
259257
| 210 | Non-Default Database Config | Forced Parameterization Enabled | https://www.BrentOzar.com/go/dbdefaults | 138 |
260258
| 210 | Non-Default Database Config | Memory Optimized Enabled | https://www.BrentOzar.com/go/dbdefaults | 144 |
261-
| 210 | Non-Default Database Config | Query Store Enabled | https://www.BrentOzar.com/go/dbdefaults | 139 |
262259
| 210 | Non-Default Database Config | Read Committed Snapshot Isolation Enabled | https://www.BrentOzar.com/go/dbdefaults | 133 |
263260
| 210 | Non-Default Database Config | Recursive Triggers Enabled | https://www.BrentOzar.com/go/dbdefaults | 136 |
264261
| 210 | Non-Default Database Config | Snapshot Isolation Enabled | https://www.BrentOzar.com/go/dbdefaults | 132 |

sp_BlitzFirst.sql

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ END;
168168
IF UPPER(@OutputType) LIKE 'TOP 10%' SET @OutputType = 'Top10';
169169
IF @OutputType = 'Top10' SET @SinceStartup = 1;
170170

171+
/* Logged Message - CheckID 38 */
171172
IF @LogMessage IS NOT NULL
172173
BEGIN
173174

@@ -1564,7 +1565,7 @@ BEGIN
15641565
EXECUTE sp_executesql @StringToExecute;
15651566
END;
15661567

1567-
/* Query Problems - Plan Cache Erased Recently */
1568+
/* Query Problems - Plan Cache Erased Recently - CheckID 7 */
15681569
IF DATEADD(mi, -15, SYSDATETIME()) < (SELECT TOP 1 creation_time FROM sys.dm_exec_query_stats ORDER BY creation_time)
15691570
BEGIN
15701571
INSERT INTO #BlitzFirstResults (CheckID, Priority, FindingsGroup, Finding, URL, Details, HowToStopIt)
@@ -1619,7 +1620,7 @@ BEGIN
16191620
AND NOT (resource_type = N'DATABASE' AND request_mode = N'S' AND request_status = N'GRANT' AND request_owner_type = N'SHARED_TRANSACTION_WORKSPACE'));
16201621

16211622

1622-
/*Query Problems - Clients using implicit transactions */
1623+
/*Query Problems - Clients using implicit transactions - CheckID 37 */
16231624
IF @Seconds > 0
16241625
AND ( @@VERSION NOT LIKE 'Microsoft SQL Server 2005%'
16251626
AND @@VERSION NOT LIKE 'Microsoft SQL Server 2008%'
@@ -1821,7 +1822,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
18211822
OUTER APPLY sys.dm_exec_query_plan(Grants.[plan_handle]) AS QueryPlan
18221823
WHERE Grants.granted_memory_kb > ((@MemoryGrantThresholdPct/100.00)*(@MaxWorkspace*1024));
18231824

1824-
/* Query Problems - Memory Leak in USERSTORE_TOKENPERM Cache */
1825+
/* Query Problems - Memory Leak in USERSTORE_TOKENPERM Cache - CheckID 45 */
18251826
IF EXISTS (SELECT * FROM sys.all_columns WHERE object_id = OBJECT_ID('sys.dm_os_memory_clerks') AND name = 'pages_kb')
18261827
BEGIN
18271828
/* SQL 2012+ version */
@@ -1976,9 +1977,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
19761977
y.request_id,
19771978
y.parallelism_skew;
19781979
1979-
/*
1980-
CheckID 42: Queries in dm_exec_query_profiles showing signs of poor cardinality estimates
1981-
*/
1980+
/* Queries in dm_exec_query_profiles showing signs of poor cardinality estimates - CheckID 42 */
19821981
INSERT INTO #BlitzFirstResults
19831982
(CheckID, Priority, FindingsGroup, Finding, URL, Details, HowToStopIt, StartTime, LoginName, NTUserName, ProgramName, HostName, DatabaseID, DatabaseName, QueryText, OpenTransactionCount, QueryHash, QueryPlan)
19841983
SELECT 42 AS CheckID,
@@ -2024,9 +2023,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
20242023

20252024
SET @StringToExecute = @StringToExecute + N';
20262025
2027-
/*
2028-
CheckID 43: Queries in dm_exec_query_profiles showing signs of unbalanced parallelism
2029-
*/
2026+
/* Queries in dm_exec_query_profiles showing signs of unbalanced parallelism - CheckID 43 */
20302027
INSERT INTO #BlitzFirstResults
20312028
(CheckID, Priority, FindingsGroup, Finding, URL, Details, HowToStopIt, StartTime, LoginName, NTUserName, ProgramName, HostName, DatabaseID, DatabaseName, QueryText, OpenTransactionCount, QueryHash, QueryPlan)
20322029
SELECT 43 AS CheckID,
@@ -2078,7 +2075,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
20782075
END
20792076
END
20802077

2081-
/* Server Performance - High CPU Utilization CheckID 24 */
2078+
/* Server Performance - High CPU Utilization - CheckID 24 */
20822079
IF @Seconds < 30
20832080
BEGIN
20842081
/* If we're waiting less than 30 seconds, run this check now rather than wait til the end.
@@ -2099,6 +2096,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
20992096
) AS y
21002097
WHERE 100 - SystemIdle >= 50;
21012098

2099+
/* CPU Utilization - CheckID 23 */
21022100
IF SERVERPROPERTY('Edition') <> 'SQL Azure'
21032101
WITH y
21042102
AS
@@ -2139,7 +2137,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
21392137
ORDER BY y.event_date DESC;
21402138

21412139

2142-
/* Highlight if non SQL processes are using >25% CPU */
2140+
/* Highlight if non SQL processes are using >25% CPU - CheckID 28 */
21432141
INSERT INTO #BlitzFirstResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL)
21442142
SELECT 28, 50, 'Server Performance', 'High CPU Utilization - Not SQL', CONVERT(NVARCHAR(100),100 - (y.SQLUsage + y.SystemIdle)) + N'% - Other Processes (not SQL Server) are using this much CPU. This may impact on the performance of your SQL Server instance', 100 - (y.SQLUsage + y.SystemIdle), 'http://www.BrentOzar.com/go/cpu'
21452143
FROM (
@@ -2342,7 +2340,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
23422340
WHERE DATEDIFF(ss, pFirst.SampleTime, pNow.SampleTime) > 0;
23432341

23442342

2345-
/* If we're within 10 seconds of our projected finish time, do the plan cache analysis. */
2343+
/* Query Stats - If we're within 10 seconds of our projected finish time, do the plan cache analysis. - CheckID 18 */
23462344
IF DATEDIFF(ss, @FinishSampleTime, SYSDATETIMEOFFSET()) > 10 AND @CheckProcedureCache = 1
23472345
BEGIN
23482346

@@ -2483,7 +2481,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
24832481
FROM #QueryStats qs
24842482
INNER JOIN qsTop ON qs.ID = qsTop.ID;
24852483

2486-
/* Query Stats - CheckID 17 - Most Resource-Intensive Queries */
2484+
/* Query Stats - Most Resource-Intensive Queries - CheckID 17 */
24872485
INSERT INTO #BlitzFirstResults (CheckID, Priority, FindingsGroup, Finding, URL, Details, HowToStopIt, QueryPlan, QueryText, QueryStatsNowID, QueryStatsFirstID, PlanHandle, QueryHash)
24882486
SELECT 17, 210, 'Query Stats', 'Most Resource-Intensive Queries', 'http://www.BrentOzar.com/go/topqueries',
24892487
'Query stats during the sample:' + @LineFeed +
@@ -2882,13 +2880,13 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
28822880
CROSS JOIN waits2;
28832881
END;
28842882

2885-
/* Server Performance - High CPU Utilization CheckID 24 */
2883+
/* If we're waiting 30+ seconds, run these checks at the end.
2884+
We get this data from the ring buffers, and it's only updated once per minute, so might
2885+
as well get it now - whereas if we're checking 30+ seconds, it might get updated by the
2886+
end of our sp_BlitzFirst session. */
28862887
IF @Seconds >= 30
28872888
BEGIN
2888-
/* If we're waiting 30+ seconds, run this check at the end.
2889-
We get this data from the ring buffers, and it's only updated once per minute, so might
2890-
as well get it now - whereas if we're checking 30+ seconds, it might get updated by the
2891-
end of our sp_BlitzFirst session. */
2889+
/* Server Performance - High CPU Utilization CheckID 24 */
28922890
INSERT INTO #BlitzFirstResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL)
28932891
SELECT 24, 50, 'Server Performance', 'High CPU Utilization', CAST(100 - SystemIdle AS NVARCHAR(20)) + N'%. Ring buffer details: ' + CAST(record AS NVARCHAR(4000)), 100 - SystemIdle, 'http://www.BrentOzar.com/go/cpu'
28942892
FROM (
@@ -2903,6 +2901,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
29032901
) AS y
29042902
WHERE 100 - SystemIdle >= 50;
29052903

2904+
/* Server Performance - CPU Utilization CheckID 23 */
29062905
INSERT INTO #BlitzFirstResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL)
29072906
SELECT 23, 250, 'Server Info', 'CPU Utilization', CAST(100 - SystemIdle AS NVARCHAR(20)) + N'%. Ring buffer details: ' + CAST(record AS NVARCHAR(4000)), 100 - SystemIdle, 'http://www.BrentOzar.com/go/cpu'
29082907
FROM (
@@ -2975,7 +2974,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
29752974
'We hope you found this tool useful.'
29762975
);
29772976

2978-
/* Outdated sp_BlitzFirst - sp_BlitzFirst is Over 6 Months Old */
2977+
/* Outdated sp_BlitzFirst - sp_BlitzFirst is Over 6 Months Old - CheckID 27 */
29792978
IF DATEDIFF(MM, @VersionDate, SYSDATETIMEOFFSET()) > 6
29802979
BEGIN
29812980
INSERT INTO #BlitzFirstResults
@@ -3064,8 +3063,9 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
30643063

30653064
END;
30663065

3067-
ELSE /* No sp_BlitzCache found, or it's outdated */
3066+
ELSE
30683067
BEGIN
3068+
/* No sp_BlitzCache found, or it's outdated - CheckID 36 */
30693069
INSERT INTO #BlitzFirstResults
30703070
( CheckID ,
30713071
Priority ,

0 commit comments

Comments
 (0)