Skip to content

Updates_20260801 - Dog Days of Sniffing

Choose a tag to compare

@erikdarlingdata erikdarlingdata released this 29 Jul 11:53
· 356 commits to main since this release

The dog days are here, and so is a brand new way to catch parameter sniffing red-handed.

New: @find_parameter_sensitive in sp_QuickieStore

Query Store's stdev columns have been sitting there unused for a decade. Now they do something: this mode groups every plan that compiled to the same shape (query_hash + query_plan_hash) and ranks shapes by how wildly their runtime metrics swing across executions of the same plan.

  • One row per plan shape, ranked by an execution-weighted coefficient of variation of your @sort_order metric
  • A signals column that calls it like it sees it: parameter sensitive (cpu swings, rows flat), row driven (work tracks data volume), intermittent waits (blocking, not parameters), memory grant swings, timeouts, PSP variants on 2022+, and plan flips across shapes
  • Only regular executions feed the statistics; timeouts and errors get counted separately instead of poisoning the math
  • Works on 2016 through 2025, version-gated like everything else
EXECUTE dbo.sp_QuickieStore
    @find_parameter_sensitive = 1;

Fixes everywhere else

Every proc in this release went through a full audit. The highlights:

  • sp_PressureDetector: CPU logging wrote every sample twice; now it does not. Logging failures in Agent jobs now fail the job instead of reporting success
  • sp_HumanEvents: startup no longer drops your own XE sessions if their names start with HumanEvents; the logged waits views compute real rates for the first time (avg_ms_per_wait truncated, and waits_per_second divided a constant 1 by the time span); shutdown failures no longer destroy the real error message
  • sp_IndexCleanup: new @min_reads/@min_writes usage floors apply to every dedupe rule path; merged includes preserved correctly; primary keys are never deduped; Azure SQL DB database names resolve
  • sp_HealthParser: an explicit NULL @log_table_name_prefix no longer silently logs nothing; fallback query text no longer truncates at 257 characters
  • sp_LogHunter: failed searches now record why they failed; help stops pretending @language_id translates anything
  • sp_QueryReproBuilder: three-part database.schema.procedure names resolve the way sp_QuickieStore resolves them; now actually prints its MIT license from @help; parameters no longer vanish from repros when the declaration list uses comma-space; faster on queries with lots of plans
  • sp_QuickieStore: logged time windows no longer understate the analyzed range when date correction kicks in
  • sp_PerfCheck: README rebuilt to match reality (all parameters, current checks, current thresholds); memory grant timeout thresholds are tunable; long blob storage URLs no longer abort the whole run; wait thresholds accept many-core percentages
  • sp_QuickieCache: reads each plan cache DMV once instead of once per query hash; system database filtering applied consistently; health findings respect your database filters
  • sp_HumanEventsBlockViewer: percentage math, blocked-only durations, contentious object attribution, and logging watermarks all fixed

All ten procs move to .8, version date 20260801.