-
Notifications
You must be signed in to change notification settings - Fork 900
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
Performance drop up to x20 with compression on #2829
Comments
Can you add the command you used to setup compression. |
Unfortunately we cannot reproduce this issue w/o knowing the exact command that was used to setup compression. |
@alex-klepa can you provide a way to reproduce it on 2.5.0? Otherwise, we need to close this issue. |
@NunoFilipeSantos The script has the compression parameters. alex-klepa Thank you for the report and data to reproduce the problem. We are investigating the performance issues. |
I've hit the same wall. My solution which works is to turn off JIT |
Hi Team - is there any update on this ticket? I just encountered it with presumably a similar scenario:
This was all working very well, I believe until I added a compression rule for data older than 30 days. Now I'm getting a scan of the full hyperchunk based on time, instead of using the index. Queries for some groups of tags have gone from 10ms up to now 800ms. Thanks - Gene Edit: my workaround was to decompress all chunks and set compress to false on this table, which worked. However I would have hoped (I'm sure it's not easy) that the query planner would have been able to see that the query was bounded way outside of the compression time window and wouldn't have caused me to have to do this? |
Hello Team, I am planning to use timescale cloud for my crypto exchange company in order to keep historical asset prices, i did a small investigation about the performance and compression and came to this issue. Everything timescale offers good excellent but I am frustrated about seeing this issue is open. Does that mean timescale can not offer compression and performance at the same time ? wont you do anything about this issue or suggest anything to your users ? |
Writing to a compressed chunk is the exception, not the norm. Typically you should be writing to uncompressed chunks, and the chunks get compressed once they've rotated out and are not being written to. Inserting into compressed chunks should generally be reserved for situations where a data source was offline, and dumps its data once coming back online after the chunk has been compressed. |
@phemmer i have investigated the sample data in the example after your comment and realized that query is between '2020-12-31 11:38' and '2020-12-31 11:39' which is old data and in a compressed chunk. I thing querying the uncompressed chunk which includes new data would give a much better performance. |
Sorry, I completely misunderstood your comment. For some reason I thought you were talking about inserts. But now that I read it again, I don't know where I got that from. So ignore what I said, it's not applicable :-) |
Relevant system information:
postgres --version
): 12.4\dx
inpsql
): 2.0.0Describe the bug
Direct hypertable query: performance drops by ~ x10 when compression is enabled. Query on continuous aggregates: drops by ~x20.
To Reproduce
Schema:
Sample data: https://www.dropbox.com/s/6l4ldo9vg1e5e39/data.csv.bz2?dl=0
psql -d new_db -c "\COPY conditions FROM data.csv CSV"
Query:
Query plan w/o compression:
Query plan w compression:
The text was updated successfully, but these errors were encountered: