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

Remove unneeded Sort over Sort #6893

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from
Draft

Conversation

akuzm
Copy link
Member

@akuzm akuzm commented May 7, 2024

We would add extra Sort nodes when adjusting the children of space
partitioning MergeAppend under ChunkAppend. This is not needed because
MergeAppend plans add the required Sort themselves, and in general no
adjustment seems to be required for the MergeAppend children
specifically there.

akuzm added 30 commits May 7, 2024 14:15
Add ANALYZE. To keep the desired MergeAppend plans, we also have to add
a LIMIT everywhere so that the MergeAppend is chosen based on its lower
startup cost. Otherwise the plain Sort over Append will be chosen
because for small tables its cost is less.
Add ANALYZE after compression. The plan changes are expected, SeqScans
are preferred over IndexScans and Sort over MergeAppend for small
tables.
We would add extra Sort nodes when adjusting the children of space
partitioning MergeAppend under ChunkAppend. This is not needed because
MergeAppend plans add the required Sort themselves, and in general no
adjustment seems to be required for the MergeAppend children
specifically there.
This reverts commit f50947e.
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.

None yet

1 participant