Skip to content

Align scoring dimensions between sp_QuickieCache and sp_QuickieStore#757

Merged
erikdarlingdata merged 1 commit intodevfrom
update/scoring-alignment-quickiecache-quickiestore
Apr 6, 2026
Merged

Align scoring dimensions between sp_QuickieCache and sp_QuickieStore#757
erikdarlingdata merged 1 commit intodevfrom
update/scoring-alignment-quickiecache-quickiestore

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • sp_QuickieCache: Switch scoring from logical reads to physical reads; add FORMAT/commas to @find_duplicate_plans output; convert cached plan size to MB; constrain ms columns to 3 decimal places
  • sp_QuickieStore @find_high_impact: Add tempdb (spills) and rows as scoring dimensions (6 → 8); add raw metric totals to output to match sp_QuickieCache's detail columns
  • Tempdb scoring gated on @new (2017+), rows available on all versions

Test plan

  • Deployed and tested on SQL2016, SQL2017, SQL2019, SQL2022, SQL2025
  • SQL2016 tempdb gracefully falls back to 0 (no avg_tempdb_space_used column)
  • All sp_QuickieCache modes verified (default, @find_duplicate_plans, @find_single_use_plans)
  • Workload concentration summary includes new top_n_tempdb_pct and top_n_rows_pct

🤖 Generated with Claude Code

sp_QuickieCache:
- Switch scoring from logical reads to physical reads (candidates, shares, PERCENT_RANK, diagnostics)
- Add FORMAT with commas to numeric columns in @find_duplicate_plans output
- Convert cached plan size from KB to MB in duplicate plans
- Constrain ms columns to 3 decimal places

sp_QuickieStore @find_high_impact:
- Add tempdb (spills) as scoring dimension (2017+ via @new, falls back to 0 on 2016)
- Add rows as scoring dimension (all versions)
- Scoring goes from 6 to 8 dimensions
- Add raw metric totals to output (total_cpu_ms, total_duration_ms, total_physical_reads_mb, total_writes_mb, total_memory_mb, total_tempdb_mb, total_rows, max_dop)
- Add tempdb_share, rows_share to output and workload concentration summary

Tested on SQL2016, SQL2017, SQL2019, SQL2022, SQL2025.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 8364408 into dev Apr 6, 2026
5 checks passed
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