timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

[Enhancement]: Delete by compression segment id

Open nluangroup opened this issue 1 year ago • 1 comments

What type of enhancement is this?

Performance

What subsystems and features will be improved?

Compression

What does the enhancement do?

When setting up compression you can choose a column to segment by to improve performance of where clauses. But why can't we delete by segment id?

Use case: we have segmented our data on an dataTypeId. Each type can have an individual retention policy, thus we would like to dump data in compressed chunks based on the dataTypeId. Our current solution is to decompress the chunk, then delete the expired data, end then recompress it.

Implementation challenges

No response

nluangroup avatar Sep 13 '23 10:09 nluangroup

@nluangroup

What version of TSDB are you using? Compressed chunks now support update/delete implicitly. So should negate the requirement to decompress, delete and recompress.

Am I missing something? Is the performance of that deletion poor? Query planner not using index for the delete?

aarondglover avatar Oct 27 '23 00:10 aarondglover