Reputation: 19441
how can we change the chunk time interval, when it is way too large?
use case:
chunk_time_interval
to 1 month (when using create_hypertable()). e.g. I think we cannot just use set_chunk_time_interval, because it will not affect the current chunk: so when a new month-chunk has just started when the data-rate is increased, this chunk would get huge and only the newer chunks would be right-sized.
So what is the best way to deal with this case?
So to clarify: we want to have one hypertable, where the older data has a different chunk size than the newer data.
Upvotes: 6
Views: 4283
Reputation: 1932
We do not currently offer a method of changing the range of an existing chunk, but you can use set_chunk_time_interval
to change the next chunk to a (say) day or hour-long period.
One approach if your database isn't too large is just to dump your data (e.g., to CSV), then recreate the database with a different setting. Parallel copy will help with faster loading: https://github.com/timescale/timescaledb-parallel-copy
(Timescale person here)
Upvotes: 5