Skip to content

Fix false positives from Joe's plan review feedback#229

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/joe-feedback-quick-wins
Apr 16, 2026
Merged

Fix false positives from Joe's plan review feedback#229
erikdarlingdata merged 1 commit intodevfrom
fix/joe-feedback-quick-wins

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Addresses quick-win items from Joe's feedback on issue #215 using plan 20260415_1.sqlplan:

  • a7: Suppress Row Estimate Mismatch (Rule 5) for Lookup operators — key lookups are point lookups where the per-execution estimate math produces misleading 10000x "mismatch" when total rows match
  • a8/a9: Suppress Non-SARGable (Rule 12), Scan With Predicate (Rule 11), and Implicit Conversion severity upgrade (Rule 29) on 0-execution nodes — warnings on operators that never ran are noise
  • a10: Suppress Row Goal (Rule 26) when actual rows ≤ the row goal estimate — the optimizer's early-stop bet paid off, no warning needed
  • a13: GetWaitStatsAdvice now always uses actual wait stats (top 3 with percentages) instead of falling through to generic "Common causes include..." text

Test plan

  • 75 existing tests pass
  • Run Joe's plan through the analyzer and verify the false positives are gone
  • Verify legitimate warnings (key lookups with actual mismatches, non-SARGable on executed nodes, harmful row goals) still fire

🤖 Generated with Claude Code

- a7: Suppress Row Estimate Mismatch (Rule 5) for Lookup operators — key
  lookups are point lookups where per-execution estimate math is misleading
- a8/a9: Suppress Non-SARGable (Rule 12), Scan With Predicate (Rule 11),
  and Implicit Conversion upgrade (Rule 29) on 0-execution nodes
- a10: Suppress Row Goal (Rule 26) when actual rows confirm the row goal
  prediction was correct (optimizer stopped reading early as planned)
- a13: Use actual wait stats in Parallel Wait Bottleneck message instead
  of generic "Common causes include..." text

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 5506e31 into dev Apr 16, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/joe-feedback-quick-wins branch April 19, 2026 00:25
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