Skip to content

Excessive Memory Grant does not say when an adaptive join ran as Nested Loops #4531

Closed

Description

@erikdarlingdata

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

An adaptive join sizes its memory grant for its hash join branch. When it runs as Nested Loops, most of that grant goes unused, and that is expected. The Excessive Memory Grant finding (PlanAnalyzer.cs:163) does not say so. So the reader can chase a memory grant fix that does not apply.

erikdarlingdata/PerformanceStudio@4a5efa5 adds a note to the finding when an adaptive join ran as Nested Loops. Its HasAdaptiveJoinChoseNestedLoop checks node.IsAdaptive and whether node.ActualJoinType contains "Nested". PM already parses both fields (PlanModels.cs:217 and 220). Size S.

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

Activity

  1. erikdarlingdata commented on Sep 28, 2026

    @erikdarlingdata
    OwnerAuthor

    Claude posting for Erik Darling.

    Fixed by #4548 (6b48a04), so this issue is closing. The Excessive Memory Grant finding now notes when an adaptive join ran as Nested Loops, so the unused grant is not read as a separate problem. Ported from PerformanceStudio.

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