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

Open
wants to merge 67 commits into
base: main
Choose a base branch
from
Open

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.

Disable-check: force-changelog-file

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.
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.54%. Comparing base (59f50f2) to head (033c6c9).
Report is 201 commits behind head on main.

Current head 033c6c9 differs from pull request most recent head 85a1926

Please upload reports for the commit 85a1926 to get more accurate results.

Files Patch % Lines
src/nodes/chunk_append/planner.c 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6893      +/-   ##
==========================================
+ Coverage   80.06%   81.54%   +1.47%     
==========================================
  Files         190      199       +9     
  Lines       37181    36851     -330     
  Branches     9450     9642     +192     
==========================================
+ Hits        29770    30050     +280     
+ Misses       2997     2851     -146     
+ Partials     4414     3950     -464     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akuzm akuzm marked this pull request as ready for review June 4, 2024 13:50
Copy link
Member

@svenklemm svenklemm left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -134,6 +134,7 @@ set(SOLO_TESTS
cagg_invalidation
move
reorder
transparent_decompression-${PG_VERSION_MAJOR}
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this in SOLO_TESTS?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just a debugging leftover, I'll remove it

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

2 participants