Skip to content

Add rule 38: Standard Edition limits batch mode queries to DOP 2 (needs server metadata in the analyzer) #4530

Description

@erikdarlingdata

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

On Standard Edition, SQL Server limits a query with batch mode operators to DOP 2. PS rule 38 fires when a plan runs at DOP 2 and has a batch mode operator. Its severity is Warning when the server is known to be Standard Edition with a MAXDOP above 2. It is Info when the edition is not known. It does not fire when the query text has a MAXDOP 2 hint, because the limit is then intentional.

erikdarlingdata/PerformanceStudio@6f9e2d6 adds the rule, and erikdarlingdata/PerformanceStudio@ed64dbc adds the hint check. erikdarlingdata/PerformanceStudio@dcec793 makes the hint check search the masked text.

PlanAnalyzer.Analyze(ParsedPlan plan) (PlanAnalyzer.cs:23) takes no server metadata. PM already collects the edition (SERVERPROPERTY('EngineEdition') in DarlingServerConnector.cs:117) and the max degree of parallelism setting. The work is to pass them into Analyze, and the rule itself is small. Size L.

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

No activity

Activity on this issue will appear here.

Activity

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