orca: implement intra-segment parallel table scan support#1398
Open
yjhjstz wants to merge 3 commits intoapache:mainfrom
Open
orca: implement intra-segment parallel table scan support#1398yjhjstz wants to merge 3 commits intoapache:mainfrom
yjhjstz wants to merge 3 commits intoapache:mainfrom
Conversation
cde0dec to
05d9edf
Compare
Contributor
|
Please add more test cases |
my-ship-it
reviewed
Oct 21, 2025
my-ship-it
reviewed
Oct 21, 2025
my-ship-it
reviewed
Oct 21, 2025
my-ship-it
reviewed
Oct 21, 2025
my-ship-it
reviewed
Oct 21, 2025
my-ship-it
reviewed
Oct 21, 2025
my-ship-it
reviewed
Oct 21, 2025
Member
Author
see src/test/regress:installcheck-orca-parallel |
05d9edf to
8a5bc1e
Compare
my-ship-it
reviewed
Oct 22, 2025
my-ship-it
reviewed
Oct 22, 2025
my-ship-it
reviewed
Oct 22, 2025
Contributor
|
Add some cases to test the plan? |
Member
Author
maybe after impl parallel hash join . |
8a5bc1e to
319b9f1
Compare
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
Fix two related issues in CDistributionSpecWorkerRandom: - Remove incorrect EdtRandom branch from Matches(): WorkerRandom should not match segment-level Random distribution - FSatisfies() now returns false for EdtRandom: neither can satisfy the other without a Motion (consistent with Random::FSatisfies(WorkerRandom)) - AppendEnforcers(): split EdtRandom and EdtWorkerRandom into separate cases; EdtRandom now creates CDistributionSpecRandom (not WorkerRandom) as Motion target Ported from hashdata-lightning commit 2800e88. Note: EdtWorkerRandom with CPhysicalMotionHashDistributeWorkers deferred pending that operator's availability.
In Cloudberry's MPP architecture, segment stats are delivered asynchronously to the coordinator. The seq_scan counter can be registered before seq_tup_read arrives from segments, causing wait_for_stats() to exit prematurely and the subsequent assertion to fail intermittently in the pax-ic-good-opt-off CI job. Add an explicit wait condition (updated6) for seq_tup_read reaching the expected value, and update the comment to reflect Cloudberry's segment-level async stats delivery rather than parallel workers.
319b9f1 to
6db920d
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.
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:
Impl #1316
TPCH improved 15%.
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