Skip to content

Commit 3aaa6f4

Browse files
authored
Update sp_BlitzCache.sql for double-spill fix
after iterating over all sort sub procedure calls ... avoid going to OutputResultsToTable ... otherwise the last result (e.g. spills) would be recorded twice into the output table.
1 parent 1224d53 commit 3aaa6f4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sp_BlitzCache.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6955,6 +6955,11 @@ END;
69556955
EXEC sys.sp_executesql @stmt = @AllSortSql, @params = N'@i_DatabaseName NVARCHAR(128), @i_Top INT, @i_SkipAnalysis BIT, @i_OutputDatabaseName NVARCHAR(258), @i_OutputSchemaName NVARCHAR(258), @i_OutputTableName NVARCHAR(258), @i_CheckDateOverride DATETIMEOFFSET, @i_MinutesBack INT ',
69566956
@i_DatabaseName = @DatabaseName, @i_Top = @Top, @i_SkipAnalysis = @SkipAnalysis, @i_OutputDatabaseName = @OutputDatabaseName, @i_OutputSchemaName = @OutputSchemaName, @i_OutputTableName = @OutputTableName, @i_CheckDateOverride = @CheckDateOverride, @i_MinutesBack = @MinutesBack;
69576957

6958+
/* Avoid going into OutputResultsToTable
6959+
... otherwise the last result (e.g. spills) would be recorded twice into the output table.
6960+
*/
6961+
RETURN;
6962+
69586963
/*End of AllSort section*/
69596964

69606965

0 commit comments

Comments
 (0)