Skip to content

Commit

Permalink
Merge pull request #3369 from Montro1981/SQL-Server-First-Responder-K…
Browse files Browse the repository at this point in the history
…it_3368

#3368 Case issue with @MinimumExecutionCount
  • Loading branch information
BrentOzar authored Oct 10, 2023
2 parents 7c39562 + b56d881 commit dfad6d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sp_BlitzCache.sql
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ IF @SortOrder LIKE 'duplicate%'
ORDER BY qs.creation_time DESC) AS mcq_recent
OPTION (RECOMPILE);

SET @minimumExecutionCount = 0;
SET @MinimumExecutionCount = 0;
END


Expand Down Expand Up @@ -4969,7 +4969,7 @@ BEGIN

IF @MinimumExecutionCount IS NOT NULL
BEGIN
SET @sql += N' AND ExecutionCount >= @minimumExecutionCount ';
SET @sql += N' AND ExecutionCount >= @MinimumExecutionCount ';
END;

IF @MinutesBack IS NOT NULL
Expand Down Expand Up @@ -5018,7 +5018,7 @@ BEGIN
PRINT SUBSTRING(@sql, 36000, 40000);
END;

EXEC sp_executesql @sql, N'@Top INT, @min_duration INT, @min_back INT, @minimumExecutionCount INT', @Top, @DurationFilter_i, @MinutesBack, @MinimumExecutionCount;
EXEC sp_executesql @sql, N'@Top INT, @min_duration INT, @min_back INT, @MinimumExecutionCount INT', @Top, @DurationFilter_i, @MinutesBack, @MinimumExecutionCount;
END;


Expand Down Expand Up @@ -5225,7 +5225,7 @@ WHERE SPID = @spid ' + @nl;

IF @MinimumExecutionCount IS NOT NULL
BEGIN
SET @sql += N' AND ExecutionCount >= @minimumExecutionCount ' + @nl;
SET @sql += N' AND ExecutionCount >= @MinimumExecutionCount ' + @nl;
END;

IF @MinutesBack IS NOT NULL
Expand Down Expand Up @@ -5268,7 +5268,7 @@ IF @Debug = 1
END;
IF(@OutputType <> 'NONE')
BEGIN
EXEC sp_executesql @sql, N'@Top INT, @spid INT, @minimumExecutionCount INT, @min_back INT', @Top, @@SPID, @MinimumExecutionCount, @MinutesBack;
EXEC sp_executesql @sql, N'@Top INT, @spid INT, @MinimumExecutionCount INT, @min_back INT', @Top, @@SPID, @MinimumExecutionCount, @MinutesBack;
END;

/*
Expand Down

0 comments on commit dfad6d5

Please sign in to comment.