Skip to content

Decide whether PerformanceMonitor drops rules 21, 25 and 31, which PerformanceStudio removed #4537

Closed

Description

@erikdarlingdata

Part of #4511, the sync of plan analysis changes from PerformanceStudio (PS) to PerformanceMonitor (PM).

PM still runs three rules that PS removed after the review of its rule set in erikdarlingdata/PerformanceStudio#215:

  • Rule 21, CTE Multiple References (PlanAnalyzer.cs:269, with its detector at line 1272).
  • Rule 25, Ineffective Parallelism (PlanAnalyzer.cs:325).
  • Rule 31, Parallel Wait Bottleneck (PlanAnalyzer.cs:312).

erikdarlingdata/PerformanceStudio@aabbaa2 (erikdarlingdata/PerformanceStudio#266) removed rule 21. The reason in the PS code is that an actual plan's runtime stats show where the time went. So a warning based on a text pattern for CTE reuse is a guess.

erikdarlingdata/PerformanceStudio@28d4c74 removed rules 25 and 31. The reason in that commit is that these warnings guess at causes that the wait stats already show. PS shows a ratio of CPU to elapsed time in its runtime summary instead.

Decide whether PM removes these rules too. If PM removes rules 25 and 31, also remove their cases in BenefitScorer.cs (lines 51 and 52).

At 1899737f. dev has no later change to PerformanceMonitor.PlanAnalysis.

Activity

  1. added a commit that references this issue on Sep 28, 2026
    130bc6a
  2. erikdarlingdata commented on Sep 28, 2026

    @erikdarlingdata
    OwnerAuthor

    Claude posting for Erik Darling.

    Fixed in #4565 (130bc6a). Rules 21, 25 and 31 are removed to match PerformanceStudio (aabbaa2, 28d4c74), and the plan viewer's runtime summary shows PerformanceStudio's CPU:Elapsed ratio instead, with external-wait time taken out of CPU first. The legacy-rule marker from aabbaa2 is tracked separately in #4566.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions