chunk_time_interval on a . The new interval is used
when new s are created, and time intervals on existing s are
not changed.
Samples
For a TIMESTAMP column, setchunk_time_interval to 24 hours:
chunk_time_interval to 24 hours:
Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
hypertable | REGCLASS | - | ✔ | or to update interval for. |
chunk_time_interval | See note | - | ✔ | Event time that each new covers. |
dimension_name | REGCLASS | - | ✖ | The name of the time dimension to set the number of partitions for. Only use dimension_name when your has multiple time dimensions. |
chunk_time_interval to 3 days, you may end up with a
transition covering one day. This happens because the start and end of the new is calculated based on
dividing the timeline by the chunk_time_interval starting at epoch 0. This leads to the following s
[0, 3), [3, 6), [6, 9), [9, 12), [12, 15), [15, 18) and so on. The two 7-day s covered data up to day 14:
[0, 7), [8, 14), so the 3-day for [12, 15) is reduced to a one day . The following [15, 18) is
created as a full 3 day .
The valid types for the chunk_time_interval depend on the type used for the
time column:
time column type | chunk_time_interval type | Time unit |
|---|---|---|
| TIMESTAMP | INTERVAL | days, hours, minutes, etc |
| INTEGER or BIGINT | microseconds | |
| TIMESTAMPTZ | INTERVAL | days, hours, minutes, etc |
| INTEGER or BIGINT | microseconds | |
| DATE | INTERVAL | days, hours, minutes, etc |
| INTEGER or BIGINT | microseconds | |
| SMALLINT | SMALLINT | The same time unit as the time column |
| INT | INT | The same time unit as the time column |
| BIGINT | BIGINT | The same time unit as the time column |