Skip to content

Release v1.5.0 — maximum benefit scoring#220

Merged
erikdarlingdata merged 7 commits intomainfrom
dev
Apr 13, 2026
Merged

Release v1.5.0 — maximum benefit scoring#220
erikdarlingdata merged 7 commits intomainfrom
dev

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

🤖 Generated with Claude Code

erikdarlingdata and others added 7 commits April 10, 2026 14:54
Surface statement-level wait stats across Rules 1, 5, 11, and 16 so the
analyzer uses actual execution wait evidence to enrich warnings. The dominant
wait type (SOS_SCHEDULER_YIELD, CXPACKET, HTBUILD, PAGEIOLATCH, LCK_M_S,
etc.) is appended to each warning message. Rule 11 (Scan with Predicate)
additionally elevates to Critical when I/O waits confirm the scan is hitting
disk at >= 50% of plan cost.

Expand GetWaitStatsAdvice (Rules 25/31) with specific explanations for all
21 wait types found in real plan files: SOS_SCHEDULER_YIELD, CXSYNC_PORT,
MEMORY_ALLOCATION_EXT, HTBUILD/HTDELETE/HTREPARTITION, BPSORT, BMPBUILD,
PAGELATCH, LOGBUFFER, ASYNC_NETWORK_IO, SOS_PHYS_PAGE_CACHE, and others.
Remove dead RESOURCE_SEMAPHORE branch (pre-execution wait, never appears
in statement-level plan wait stats).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Annotate each wait stat line in the advice panel with a short description
(e.g., "I/O — reading data from disk", "CPU — scheduler yielding") so
users can immediately understand what each wait type means without leaving
the panel. Labels render inline in muted text via GetWaitLabel().

Extract DescribeWaitType() from GetWaitStatsAdvice() so the wait type
knowledge is reusable. Remove dead RESOURCE_SEMAPHORE branch (pre-execution
wait, never appears in plan wait stats). Drop the separate summary line
that had formatting issues in favor of per-line inline labels.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-cutting

Add wait stats as cross-cutting analysis signal
… card

Remove GetTopWaitContext calls from Rules 1, 5, 11, and 16 — statement-level
waits can't be attributed to individual operators, so appending the dominant
wait type to every warning was noise rather than analysis.

Keep Rule 11 I/O severity elevation (scan + PAGEIOLATCH at 50%+ cost →
Critical) since a dominant scan with I/O waits is a defensible correlation.

Add wait profile classification to the triage summary card — categorizes
queries as "I/O bound", "CPU bound", "parallelism bound", or "lock
contention bound" based on wait category percentages (>= 30% threshold).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip operator-level wait noise, add query classification
Introduce BenefitScorer — a second-pass analysis that calculates the
maximum percentage of elapsed time each finding could save if addressed.
Findings are now sorted by benefit descending across CLI text/HTML output,
JSON API, and the desktop app's Properties panel and tooltips. This reduces
noise on large plans by surfacing high-impact findings first.

Stage 1 of the maximum benefit system scores operator-level rules
(Filter, Spill, Key Lookup, Scan, UDF, Nested Loops) using actual
operator self-time, with CostPercent fallback for estimated plans.

Bump version to 1.5.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add maximum benefit scoring for plan analysis findings
@erikdarlingdata erikdarlingdata merged commit 838f40f into main Apr 13, 2026
1 check failed
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