Skip to content

Commit ea13df4

Browse files
Pass @skip_locks and @skip_waits to sp_HealthParser in collector wrapper
The dashboard doesn't display blocking/deadlock or wait stats data from sp_HealthParser. Passing @skip_locks = 1 and @skip_waits = 1 (defaulted on) reduces collection time from 43s to 1.6s (27x improvement). Requires sp_HealthParser 3.3+ (DarlingData PR #666/#667). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 716cfd0 commit ea13df4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

install/28_collect_system_health_wrapper.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ ALTER PROCEDURE
3636
@what_to_check varchar(10) = 'all', /*What portion of data to collect (all, waits, cpu, memory, disk, system, locking)*/
3737
@hours_back integer = 1, /*How many hours back to analyze*/
3838
@warnings_only bit = 1, /*Only collect data from recorded warnings*/
39+
@skip_locks bit = 1, /*Skip the blocking and deadlocks section*/
40+
@skip_waits bit = 1, /*Skip the wait stats section*/
3941
@log_retention_days integer = 30, /*Days to retain sp_HealthParser data*/
4042
@procedure_database sysname = NULL, /*Database where sp_HealthParser is installed (NULL = search PerformanceMonitor then master)*/
4143
@debug bit = 0 /*Print debugging information*/
@@ -164,6 +166,8 @@ BEGIN
164166
@start_date = @start_date,
165167
@end_date = @end_date,
166168
@warnings_only = @warnings_only,
169+
@skip_locks = @skip_locks,
170+
@skip_waits = @skip_waits,
167171
@log_to_table = 1,
168172
@log_database_name = N''PerformanceMonitor'',
169173
@log_schema_name = N''collect'',
@@ -173,11 +177,13 @@ BEGIN
173177

174178
EXECUTE sys.sp_executesql
175179
@sql,
176-
N'@what_to_check varchar(10), @start_date datetimeoffset(7), @end_date datetimeoffset(7), @warnings_only bit, @log_retention_days integer, @debug bit',
180+
N'@what_to_check varchar(10), @start_date datetimeoffset(7), @end_date datetimeoffset(7), @warnings_only bit, @skip_locks bit, @skip_waits bit, @log_retention_days integer, @debug bit',
177181
@what_to_check = @what_to_check,
178182
@start_date = @start_date,
179183
@end_date = @end_date,
180184
@warnings_only = @warnings_only,
185+
@skip_locks = @skip_locks,
186+
@skip_waits = @skip_waits,
181187
@log_retention_days = @log_retention_days,
182188
@debug = @debug;
183189

0 commit comments

Comments
 (0)