-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ORCA: allow not enforce distribution key in 3-stage aggregate #776
ORCA: allow not enforce distribution key in 3-stage aggregate #776
Conversation
The context about this PR: ORCA can create the 3-stage agg in So u can see the 3-stage agg path but no cost generated in the memo. like
The GroupExpression#6 is the Three Stage Scalar DQA. Details of why this path have no cost:
|
Just tried, but cannot produce 3-stage aggregate still, the cost is still higher than 2-stage aggregate.
|
d641a07
to
4b0ab11
Compare
also need running with GUC updated the test cases... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. LGTM
4b0ab11
to
990d240
Compare
Fixes #659
Change log
In the case where the group-by key is a distribution key, ORCA disables 3-stage aggregate by default.
Add a new GUC(optimizer_enable_use_distribution_in_dqa) to allow not enforce distribution key in 3-stage aggregate in ORCA. which enables local deduplication before the 2-stage agg.
Type of Change
Breaking Changes
Test Plan
make installcheck
make -C src/test installcheck-cbdb-parallel
Impact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions