TmTron
TmTron

Reputation: 19441

how to change the chunk time interval?

how can we change the chunk time interval, when it is way too large?

use case:

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

Answers (1)

Mike Freedman
Mike Freedman

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

Related Questions