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

Account for filters in DecompressChunk row estimates #6563

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

Conversation

akuzm
Copy link
Member

@akuzm akuzm commented Jan 24, 2024

We don't account for them at all currently, which leads to weird planning behavior, like the filters not influencing the position of relations in join. We don't normally have the statistics on uncompressed tables of compressed chunks, so these estimates will be using the Postgres defaults that are chosen based on the kind of filter.

Disable-check: force-changelog-file

We don't account for them at all currently, which leads to weird
planning behavior, like the filters not influencing the position of
relations in join.
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c715d96) 79.73% compared to head (ce2b7cd) 79.70%.
Report is 2 commits behind head on main.

❗ Current head ce2b7cd differs from pull request most recent head afcbe74. Consider uploading reports for the commit afcbe74 to get more accurate results

Files Patch % Lines
tsl/src/nodes/decompress_chunk/qual_pushdown.c 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6563      +/-   ##
==========================================
- Coverage   79.73%   79.70%   -0.04%     
==========================================
  Files         188      188              
  Lines       36768    36726      -42     
  Branches     9295     9280      -15     
==========================================
- Hits        29318    29271      -47     
- Misses       3112     3126      +14     
+ Partials     4338     4329       -9     

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

Comment on lines +18 to +21
INSERT INTO mapc_test
SELECT time, device, device * 0.1
FROM generate_series('2020-01-02'::timestamptz,'2020-01-18'::timestamptz,'6 hour') time,
generate_series(1,3) device;
FROM generate_series('2020-01-02'::timestamptz,'2020-01-15'::timestamptz,'4 second') time,
generate_series(1,10) device;
Copy link
Member Author

Choose a reason for hiding this comment

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

After adding the missed ANALYZE, I had to add much more rows to keep the old plans. Also renamed it to something less generic and removed the third chunk which doesn't really add coverage.

@akuzm akuzm marked this pull request as ready for review January 25, 2024 09:35
Copy link

@mkindahl, @antekresic: please review this pull request.

Powered by pull-review

@mkindahl mkindahl removed their request for review February 20, 2024 07:49
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

3 participants