timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
16.8k stars 852 forks source link

Reduce decompression on compressed INSERT #7075

Open svenklemm opened 5 days ago

svenklemm commented 5 days ago

Previously for INSERTs into compressed chunks with unique constraints we would decompress the batch which would contain the tuple matching according to the constraints. This patch will skip the decompressing if the batch does not contain an actual matching tuples. This patch adds the optimization for INSERT with unique constraints. Similar optimizations for UPDATE and DELETE will be added in followup patches.