Conversation
… data The tbl_PERF_STATS_SCRIPT_RUNTIMES table was populated only from tbl_OS_WAIT_STATS before the blocking chain analysis ran, causing MAX(runtime) to be earlier than the actual last data collection snapshot. Runtimes from tbl_REQUESTS and tbl_NOTABLEACTIVEQUERIES are now inserted into tbl_PERF_STATS_SCRIPT_RUNTIMES before the blocking chain UPDATE executes, ensuring blocking_end reflects the true end of data collection.
There was a problem hiding this comment.
Pull request overview
This PR fixes incorrect blocking_end values in the postmortem blocking-chain analysis by ensuring tbl_PERF_STATS_SCRIPT_RUNTIMES includes runtimes from additional source tables before the end-of-collection update runs.
Changes:
- Insert distinct
runtimevalues fromtbl_REQUESTSandtbl_NOTABLEACTIVEQUERIESintodbo.tbl_PERF_STATS_SCRIPT_RUNTIMESprior to the blocking-chainblocking_endupdate. - Update the expected SHA256 hash for
PerfStatsAnalysis.sqlin the script integrity allowlist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sqlnexus/ScriptIntegrity.cs | Updates the stored hash for PerfStatsAnalysis.sql to match the modified script content. |
| sqlnexus/PerfStatsAnalysis.sql | Inserts additional runtimes before blocking-chain end-time correction so MAX(runtime) reflects the true end of collection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bd8f7e4 to
0485311
Compare
…acitandogan_260427_wrongBlockingDuration
There was a problem hiding this comment.
memory scenario import fails on this PR with error below. confirmed it works on public version
SQLNexus Information: 0 : Rowset Importer failed for file: xxxxxxxxx_SQL_Server_Mem_Stats.outexception: RowsetImportEngine.RowsetImportException: RowsetImport failed. ---> System.ArgumentException: Unsafe column name.
at RowsetImportEngine.TextRowsetImporter.CreateTable() in C:\GitHub\SqlNexus\RowsetImportEngine\TextRowsetImporter.cs:line 391
--- End of inner exception stack trace ---
… data
The tbl_PERF_STATS_SCRIPT_RUNTIMES table was populated only from tbl_OS_WAIT_STATS before the blocking chain analysis ran, causing MAX(runtime) to be earlier than the actual last data collection snapshot. Runtimes from tbl_REQUESTS and tbl_NOTABLEACTIVEQUERIES are now inserted into tbl_PERF_STATS_SCRIPT_RUNTIMES before the blocking chain UPDATE executes, ensuring blocking_end reflects the true end of data collection.