Skip to content

Commit f5fed65

Browse files
authored
Merge pull request BrentOzarULTD#3923 from BrentOzarULTD/copilot/adjust-in-memory-oltp-warning-priorities
sp_BlitzFirst: downgrade In-Memory OLTP priorities when XTP memory is tempdb-only
2 parents 5cff578 + 6313ae3 commit f5fed65

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

sp_BlitzFirst.sql

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,6 +3526,34 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
35263526
AND ps.counter_name = 'Transactions aborted/sec'
35273527
AND ps.value_delta > (10 * @Seconds); /* Ignore servers sitting idle */
35283528

3529+
IF EXISTS
3530+
(
3531+
SELECT 1/0
3532+
FROM #PerfmonStats AS ps
3533+
WHERE ps.Pass = 2
3534+
AND ps.object_name = @ServiceName + ':Databases'
3535+
AND ps.counter_name = 'XTP Memory Used (KB)'
3536+
AND ps.instance_name = 'tempdb'
3537+
AND ps.cntr_value > 0
3538+
)
3539+
AND NOT EXISTS
3540+
(
3541+
SELECT 1/0
3542+
FROM #PerfmonStats AS ps
3543+
WHERE ps.Pass = 2
3544+
AND ps.object_name = @ServiceName + ':Databases'
3545+
AND ps.counter_name = 'XTP Memory Used (KB)'
3546+
AND ps.instance_name NOT IN ('tempdb', '_Total')
3547+
AND ps.cntr_value > 0
3548+
)
3549+
BEGIN
3550+
UPDATE bfr
3551+
SET bfr.Priority = 210
3552+
FROM #BlitzFirstResults AS bfr
3553+
WHERE bfr.FindingsGroup = 'In-Memory OLTP'
3554+
AND bfr.Priority < 210;
3555+
END;
3556+
35293557
/* Query Problems - Suboptimal Plans/Sec High - CheckID 33 */
35303558
IF (@Debug = 1)
35313559
BEGIN

0 commit comments

Comments
 (0)