Skip to main content
Since 1.2.0 Create a policy to reorder the rows of a hypertable‘s chunks on a specific index. The policy reorders the rows for all chunks except the two most recent ones, because these are still getting writes. By default, the policy runs every 24 hours. To change the schedule, call alter_job and adjust schedule_interval. You can have only one reorder policy on each hypertable. For manual reordering of individual chunks, see reorder_chunk.
When a chunk‘s rows have been reordered by a policy, they are not reordered by subsequent runs of the same policy. If you write significant amounts of data into older chunks that have already been reordered, re-run reorder_chunk on them. If you have changed a lot of older chunks, it is better to drop and recreate the policy.

Samples

Creates a policy to reorder chunks by the existing (device_id, time) index every 24 hours. This applies to all chunks except the two most recent ones.

Arguments

The syntax is:

Returns