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
Reduce transparent_decompress_chunk flakiness #6550
base: main
Are you sure you want to change the base?
Conversation
Add ANALYZE after compression of `metrics_compressed` in shared test setup.
Result (actual rows=7196 loops=1) | ||
-> Sort (actual rows=7196 loops=1) | ||
Sort Key: t."time", t.device_id | ||
Sort Method: quicksort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a regression, why does it no longer use index scan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple other places look suspicious as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't like these plans as well, and the only thing I did is added ANALYZE. Maybe the table must be made bigger... It seems that the compressed table is very small in some queries (e.g. about 20 rows), so it starts to prefer seq scan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scan below decompress_chunk shouldnt be affected statistics changes as those are not picked based on cost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the create_compressed_scan_path
, it does make cost-based decisions on seq scan vs index scan (it adds them using the normal add_path
), so I guess this might be the reason for what we're seeing here.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6550 +/- ##
==========================================
- Coverage 79.74% 79.37% -0.37%
==========================================
Files 189 188 -1
Lines 36894 36462 -432
Branches 9343 9217 -126
==========================================
- Hits 29421 28942 -479
- Misses 3123 3165 +42
- Partials 4350 4355 +5 ☔ View full report in Codecov by Sentry. |
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.
…ially_compressed-*
…ially_compressed-*
…ially_compressed-*
This PR renames some things in preparation to cost changes from #6550 Also simplifies path creation for partial chunks, improving some plans (now index scans are used instead of sort).
Add ANALYZE after compression of
metrics_compressed
in shared test setup.To find slow queries:
Parts: