Parameter-table accuracy sweep + fractional-ms @query_duration_ms#817
Merged
Conversation
Change @query_duration_ms from integer to decimal(18,3) so a sub-1ms query-capture floor can be expressed (e.g. 0.5 = 500 microseconds) instead of only whole milliseconds or 0 (no floor). The ms-to-microsecond conversion is wrapped in CONVERT(bigint, ...) so the event-session duration predicate always receives a clean integer literal. Whole-millisecond inputs behave exactly as before; 0 still removes the floor entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Audited every procedure's parameter table -- both the per-proc folder READMEs and the aggregated root README -- against each procedure's declared parameters and @help output, and corrected them. Fixes: - Wrong data types: sp_QuickieCache @top (bigint), sp_HumanEvents @custom_name (sysname), sp_HumanEvents @query_duration_ms (decimal). - Swapped valid inputs: sp_PressureDetector @skip_perfmon and @sample_seconds. - Wrong default: sp_QueryReproBuilder @end_date (NULL). - Stale/incomplete valid inputs: @query_sort_order (event_time), @execution_type_desc (failed), @sort_order (average prefix), @target_type (table mode), @cleanup_targets (comma-separated combos). - ~25 undocumented parameters added across sp_QuickieStore, sp_QueryReproBuilder, sp_QuickieCache, sp_HumanEventsBlockViewer (@skip_execution_plans), sp_IndexCleanup, sp_PerfCheck (@help), TestBackupPerformance (@encryption_list). - Restored dropped detail (observer-overhead / UTC / type-constraint warnings, log default parentheticals, other qualifiers) while preserving intentional house-style wording. - TestBackupPerformance: corrected the defaults combination count (24 -> 72) and the compression+encryption result-set description. sp_LogHunter was already accurate. The Install-All bundle is left untouched (CI regenerates it). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related pieces of work:
sp_HumanEvents fractional-millisecond floor.
@query_duration_msis nowdecimal(18,3), so you can set a sub-1ms query-capture floor (e.g.0.5= 500 microseconds) instead of only whole milliseconds or0. Whole-ms values behave exactly as before;0still removes the floor. The ms->microsecond conversion is wrapped inCONVERT(bigint, ...)so the event-sessiondurationpredicate always gets a clean integer literal. Verified on SQL Server 2016 SP3:@query_duration_ms = 0.5generatesduration >= 500and captures sub-1ms queries.Parameter-table documentation sweep. Audited all 12 procedures' parameter tables -- each folder README plus the aggregated root README -- against the declared parameters and
@helpoutput.Notable doc corrections
@topinteger->bigint (sp_QuickieCache),@custom_namenvarchar->sysname (sp_HumanEvents).@skip_perfmon/@sample_seconds(sp_PressureDetector).@end_datewas listed as "current date/time" but isNULL(sp_QueryReproBuilder).event_time,failed,averageprefix,tabletarget mode, comma-separated cleanup targets.@skip_execution_planson the block viewer, sp_IndexCleanup,@helpon sp_PerfCheck,@encryption_liston TestBackupPerformance).sp_LogHunter was already accurate. The Install-All bundle is intentionally untouched (CI regenerates it).
Test plan
@query_duration_ms = 0.5-> predicateduration >= 500, captures sub-1ms queries.🤖 Generated with Claude Code