Skip to content
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

Offload entry root slice to QE #385

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

Ray-Eldath
Copy link
Contributor

@Ray-Eldath Ray-Eldath commented Feb 28, 2024

For some queries, Sort, (Finalized) Aggregate and Join are executed on QD, which increase workload on a single point. This PR alleviates this by offloading these operators to a QE. Specifically, it checks whether the root slice (the slice of the Plan before it meets the first Motion) contains these operators in should_offload_entry_to_qe_plan_walker, then it checks whether the offloading can be performed safely in safe_to_offload_entry_to_qe_rte_walker by walking the range table. This implementation specifically does not rely on RelOptInfo or anything postgres-optimizer-specific so that we can port this to Orca in the future.

@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch 3 times, most recently from eb7f7fc to e5e074f Compare February 29, 2024 07:01
@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch 3 times, most recently from e9ae87e to ec724c3 Compare March 1, 2024 08:44
@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch 3 times, most recently from 6229fcb to 58a5e51 Compare March 6, 2024 03:42
Copy link
Contributor

@avamingli avamingli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch from 58a5e51 to b3dfabf Compare March 12, 2024 06:47
@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch from b3dfabf to 1a92883 Compare March 14, 2024 08:06
@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch 2 times, most recently from c5cb4c9 to d472c6b Compare March 18, 2024 06:36
@Ray-Eldath Ray-Eldath requested a review from yjhjstz March 18, 2024 07:13
@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch from d472c6b to 6bab2a3 Compare March 18, 2024 09:15
For some queries, Sort, (Finalized) Aggregate and Join are executed on
QD, which increase workload on a single point. This PR alleviates this
by offloading these operators to a QE. Specifically, it checks whether
the root slice (the slice of the Plan before it meets the first Motion)
contains these operators in should_offload_entry_to_qe_plan_walker, then
it checks whether the offloading can be performed safely in
safe_to_offload_entry_to_qe_rte_walker by walking the range table.
This implementation specifically does not rely on RelOptInfo or anything
postgres-optimizer-specific so that we can port this to Orca in the
future.
@Ray-Eldath Ray-Eldath force-pushed the offload-entry-to-qe/modify branch from 6bab2a3 to b7fb8d0 Compare March 18, 2024 09:26
@Ray-Eldath
Copy link
Contributor Author

@my-ship-it Maybe merge this as well? :)

@my-ship-it my-ship-it merged commit b3b1198 into apache:main Mar 19, 2024
9 checks passed
foreyes pushed a commit to foreyes/cloudberrydb that referenced this pull request Jul 8, 2024
For some queries, Sort, (Finalized) Aggregate and Join are executed on
QD, which increase workload on a single point. This PR alleviates this
by offloading these operators to a QE. Specifically, it checks whether
the root slice (the slice of the Plan before it meets the first Motion)
contains these operators in should_offload_entry_to_qe_plan_walker, then
it checks whether the offloading can be performed safely in
safe_to_offload_entry_to_qe_rte_walker by walking the range table.
This implementation specifically does not rely on RelOptInfo or anything
postgres-optimizer-specific so that we can port this to Orca in the
future.
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.

4 participants