timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

[Enhancement]: Add index support to compress_chunk

Open svenklemm opened this issue 1 year ago • 0 comments

What type of enhancement is this?

Performance

What subsystems and features will be improved?

Compression

What does the enhancement do?

Currently compress_chunk will never use an index even if one matching the order by configuration exists. Currently we always do a tuple sort over a table scan leading to temp file creation when not enough memory is configured. This explains some of the problems our users are seeing when compressing large chunks. When an index is present that matches the order by configuration we can skip the tuple sort completely and get sorted tuples from an index scan instead which should speed up compression and eliminate any temp file creation in compress_chunk.

Implementation challenges

No response

svenklemm avatar Aug 15 '22 19:08 svenklemm