ORCA: add gp_orca_use_streaming_hashagg GUC to control streaming hashagg#1681
Open
yjhjstz wants to merge 1 commit intoapache:mainfrom
Open
ORCA: add gp_orca_use_streaming_hashagg GUC to control streaming hashagg#1681yjhjstz wants to merge 1 commit intoapache:mainfrom
yjhjstz wants to merge 1 commit intoapache:mainfrom
Conversation
… agg ORCA unconditionally sets stream_safe=true for all local HashAggs in FLocalHashAggStreamSafe, so the existing gp_use_streaming_hashagg GUC (which is only read by the Postgres planner path in cdbgroupingpaths.c) has no effect when optimizer=on. There was no way to disable streaming hash agg for ORCA plans. Introduce gp_orca_use_streaming_hashagg (default on) and wire it through the standard CConfigParamMapping path: map it (negated) to a new EopttraceDisableStreamingHashAgg traceflag, and check that traceflag in FLocalHashAggStreamSafe. When the GUC is off, ORCA emits a non-streaming Partial HashAggregate that spills to disk and fully deduplicates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TPC-H SF=10 Performance Change Summary
Overall Result
Total runtime: 274,201 ms → 245,672 ms (−10.4%, saved 28.5s)
Root Cause of Plan Changes
All plan diffs follow the same pattern:
Streaming Partial HashAggregate→HashAggregate.Per-Query Changes
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions