Skip to content

Parameter-table accuracy sweep + fractional-ms @query_duration_ms#817

Merged
erikdarlingdata merged 2 commits into
devfrom
param-table-sweep
Jul 5, 2026
Merged

Parameter-table accuracy sweep + fractional-ms @query_duration_ms#817
erikdarlingdata merged 2 commits into
devfrom
param-table-sweep

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Summary

Two related pieces of work:

  1. sp_HumanEvents fractional-millisecond floor. @query_duration_ms is now decimal(18,3), so you can set a sub-1ms query-capture floor (e.g. 0.5 = 500 microseconds) instead of only whole milliseconds or 0. Whole-ms values behave exactly as before; 0 still removes the floor. The ms->microsecond conversion is wrapped in CONVERT(bigint, ...) so the event-session duration predicate always gets a clean integer literal. Verified on SQL Server 2016 SP3: @query_duration_ms = 0.5 generates duration >= 500 and captures sub-1ms queries.

  2. Parameter-table documentation sweep. Audited all 12 procedures' parameter tables -- each folder README plus the aggregated root README -- against the declared parameters and @help output.

Notable doc corrections

  • Data-type errors: @top integer->bigint (sp_QuickieCache), @custom_name nvarchar->sysname (sp_HumanEvents).
  • Swapped valid inputs: @skip_perfmon / @sample_seconds (sp_PressureDetector).
  • Wrong default: @end_date was listed as "current date/time" but is NULL (sp_QueryReproBuilder).
  • Stale/incomplete valid inputs: event_time, failed, average prefix, table target mode, comma-separated cleanup targets.
  • ~25 undocumented parameters added (sp_QuickieStore, sp_QueryReproBuilder, sp_QuickieCache, @skip_execution_plans on the block viewer, sp_IndexCleanup, @help on sp_PerfCheck, @encryption_list on TestBackupPerformance).
  • 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 intentionally untouched (CI regenerates it).

Test plan

  • sp_HumanEvents installs and runs on SQL 2016 SP3; @query_duration_ms = 0.5 -> predicate duration >= 500, captures sub-1ms queries.
  • All changed README tables validated for consistent column counts (no malformed rows).

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits July 5, 2026 15:49
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>
@erikdarlingdata erikdarlingdata merged commit 3f497bf into dev Jul 5, 2026
5 checks passed
@erikdarlingdata erikdarlingdata deleted the param-table-sweep branch July 5, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant