-
Notifications
You must be signed in to change notification settings - Fork 189
[WIP] Orca parallel #1452
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
base: main
Are you sure you want to change the base?
[WIP] Orca parallel #1452
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
| GPOS_WSZ_LIT( | ||
| "Enable Eager Agg transform for pushing aggregate below an innerjoin.")}, | ||
|
|
||
| {EopttraceEnableParallelAppendScan, &optimizer_enable_parallel_append, |
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.
make optimizer_enable_parallel_append default to true ?
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.
use false better, otherwise we should change other ci pipeline config values.
| case COperator::EopPhysicalParallelAppendTableScan: | ||
| return CCost( | ||
| pci->NumRebinds() * | ||
| (dInitScan + pci->Rows() * dTableWidth * dTableScanCostUnit) - 10); |
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.
how to calc ParallelAppend cost?
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.
temp solution here, will clac with parallel workers.
src/backend/gporca/libgpopt/src/xforms/CXformDynamicGet2ParallelAppendTableScan.cpp
Outdated
Show resolved
Hide resolved
220a72e to
e14e819
Compare
0aa161c to
4245439
Compare
9932028 to
4533d7f
Compare
| {"test":"ic-orca-parallel", | ||
| "make_configs":["src/test/regress:installcheck-orca-parallel"], | ||
| "pg_settings":{ | ||
| "optimizer_enable_parallel_append":"true" | ||
| } |
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.
That would be better to add the same test to the build-deb-cloudberry.yml workflow.
a98a789 to
7d555d8
Compare
a3fc80b to
b848155
Compare
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