Closed
Conversation
Add comprehensive parallel table scan capability to GPORCA optimizer, enabling worker-level parallelism within segments for improved query performance on large table scans. Key components: - New CPhysicalParallelTableScan operator and CDistributionSpecWorkerRandom distribution specification for worker-level data distribution - CXformGet2ParallelTableScan transformation with parallel safety checks (excludes CTEs, dynamic scans, foreign tables, replicated tables, etc.) - Cost model integration with parallel_setup_cost and efficiency degradation scaling (logarithmic based on worker count) - DXL serialization/deserialization for CDXLPhysicalParallelTableScan - Plan translation to PostgreSQL SeqScan nodes with parallel_aware=true - Rewindability constraints (parallel scans are non-rewindable) - GUC integration: max_parallel_workers_per_gather controls worker count
revert CDistributionSpecRandom.cpp
bf6b7e9 to
16dab64
Compare
yjhjstz
reviewed
Nov 26, 2025
| GPOS_WSZ_LIT( | ||
| "Enable Eager Agg transform for pushing aggregate below an innerjoin.")}, | ||
|
|
||
| {EopttraceEnableParallelAppendScan, &optimizer_enable_parallel_append, |
Member
There was a problem hiding this comment.
make optimizer_enable_parallel_append default to true ?
Contributor
Author
There was a problem hiding this comment.
use false better, otherwise we should change other ci pipeline config values.
yjhjstz
reviewed
Nov 26, 2025
| case COperator::EopPhysicalParallelAppendTableScan: | ||
| return CCost( | ||
| pci->NumRebinds() * | ||
| (dInitScan + pci->Rows() * dTableWidth * dTableScanCostUnit) - 10); |
Member
There was a problem hiding this comment.
how to calc ParallelAppend cost?
Contributor
Author
There was a problem hiding this comment.
temp solution here, will clac with parallel workers.
yjhjstz
reviewed
Nov 28, 2025
src/backend/gporca/libgpopt/src/xforms/CXformDynamicGet2ParallelAppendTableScan.cpp
Outdated
Show resolved
Hide resolved
220a72e to
e14e819
Compare
0aa161c to
4245439
Compare
tuhaihe
reviewed
Dec 1, 2025
9932028 to
4533d7f
Compare
tuhaihe
reviewed
Dec 1, 2025
Comment on lines
+330
to
+334
| {"test":"ic-orca-parallel", | ||
| "make_configs":["src/test/regress:installcheck-orca-parallel"], | ||
| "pg_settings":{ | ||
| "optimizer_enable_parallel_append":"true" | ||
| } |
Member
There was a problem hiding this comment.
That would be better to add the same test to the build-deb-cloudberry.yml workflow.
a98a789 to
7d555d8
Compare
a3fc80b to
b848155
Compare
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.
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