-
Notifications
You must be signed in to change notification settings - Fork 895
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
Apply sort transform optimizations to compressed chunks #7528
base: main
Are you sure you want to change the base?
Conversation
Currently we transform sorting by `time_bucket` to sorting by `time` only for uncompressed chunks. Implement it for the compressed chunks as well.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7528 +/- ##
==========================================
+ Coverage 80.06% 82.22% +2.15%
==========================================
Files 190 231 +41
Lines 37181 43413 +6232
Branches 9450 10923 +1473
==========================================
+ Hits 29770 35697 +5927
- Misses 2997 3391 +394
+ Partials 4414 4325 -89 ☔ View full report in Codecov by Sentry. |
This reverts commit c401f44.
This reverts commit 665418f.
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.
lgtm
Currently we transform sorting by
time_bucket
to sorting bytime
only for uncompressed chunks. Implement it for the compressed chunks as well.In tsbench, some queries are up to 770x faster:
https://grafana.ops.savannah-dev.timescale.com/d/fasYic_4z/compare-akuzm?orgId=1&var-branch=All&var-run1=3997&var-run2=3998&var-threshold=0.02&var-use_historical_thresholds=true&var-threshold_expression=2%20%2A%20percentile_cont%280.90%29&var-exact_suite_version=false&from=now-2d&to=now
Should improve the query plans in this issue: #6310