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
17.51k stars 879 forks source link

Hypertables expand add_dimension() secondary dimension with List partitioning beside Hash partitioning #6179

Open muntdan opened 11 months ago

muntdan commented 11 months ago

What type of enhancement is this?

API improvement

What subsystems and features will be improved?

Adaptive chunking

What does the enhancement do?

Today there is support for secondary dimension only as a hash: https://docs.timescale.com/api/latest/hypertable/add_dimension/ This means you cant have full control on a Multi - Tenant scenario that distinct values dont end up in the same chunk. Expanding the capability/parameters of this function to accept a List of static values and create exact LIST partitioning towards them would solve this.

Implementation challenges

No response

adriangb commented 9 months ago

This would be a really useful feature for us. Especially if support for retention policies and tiered storage was expanded to support the additional dimensions. It would be a standout feature that competitors simply don’t offer.

ewoolsey commented 1 month ago

Yeah agreed. This would be a killer feature. Api would likely look like this:

SELECT add_dimension('my_table', by_list('my_column'));