Skip to content

Conversation

@zhangwenchao-123
Copy link
Contributor

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


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
@zhangwenchao-123 zhangwenchao-123 force-pushed the orca_parallel branch 4 times, most recently from bf6b7e9 to 16dab64 Compare November 26, 2025 06:38
GPOS_WSZ_LIT(
"Enable Eager Agg transform for pushing aggregate below an innerjoin.")},

{EopttraceEnableParallelAppendScan, &optimizer_enable_parallel_append,
Copy link
Member

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 ?

Copy link
Contributor Author

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);
Copy link
Member

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?

Copy link
Contributor Author

@zhangwenchao-123 zhangwenchao-123 Nov 27, 2025

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.

@my-ship-it my-ship-it changed the title Orca parallel [WIP] Orca parallel Nov 28, 2025
@zhangwenchao-123 zhangwenchao-123 force-pushed the orca_parallel branch 4 times, most recently from 0aa161c to 4245439 Compare December 1, 2025 07:43
@zhangwenchao-123 zhangwenchao-123 force-pushed the orca_parallel branch 2 times, most recently from 9932028 to 4533d7f Compare December 1, 2025 07:54
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"
}
Copy link
Member

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.

@zhangwenchao-123 zhangwenchao-123 force-pushed the orca_parallel branch 3 times, most recently from a98a789 to 7d555d8 Compare December 5, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants