Skip to content

Commit f90b7a5

Browse files
committed
#3120 sp_BlitzCache AvgMaxMemoryGrant
Was dividing the max by the number of executions, instead of dividing the total. Closes #3120.
1 parent 5efdcc6 commit f90b7a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sp_BlitzCache.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2322,7 +2322,7 @@ BEGIN
23222322
min_used_grant_kb AS MinUsedGrantKB,
23232323
max_used_grant_kb AS MaxUsedGrantKB,
23242324
CAST(ISNULL(NULLIF(( max_used_grant_kb * 1.00 ), 0) / NULLIF(min_grant_kb, 0), 0) * 100. AS MONEY) AS PercentMemoryGrantUsed,
2325-
CAST(ISNULL(NULLIF(( max_grant_kb * 1. ), 0) / NULLIF(execution_count, 0), 0) AS MONEY) AS AvgMaxMemoryGrant, ';
2325+
CAST(ISNULL(NULLIF(( total_grant_kb * 1. ), 0) / NULLIF(execution_count, 0), 0) AS MONEY) AS AvgMaxMemoryGrant, ';
23262326
END;
23272327
ELSE
23282328
BEGIN

0 commit comments

Comments
 (0)