Data tiering overview
Tiger Cloud API reference for data tiering. Includes SQL functions for moving older chunks to object storage on a schedule that you define
Time-series data accumulates rapidly and the value of older data typically decreases over time. To control storage costs without losing access to historical data, you can move older chunks from local storage to lower-cost object storage while keeping them fully queryable through the same hypertable.
With Tiger Cloud, you can manually tier individual chunks or implement automated policies using these APIs.
For more information about working with tiered data, see Manage storage and tiering.
Samples
Section titled “Samples”Create a tiering policy to move chunks older than 3 weeks to object storage
Section titled “Create a tiering policy to move chunks older than 3 weeks to object storage”SELECT add_tiering_policy('assets_candlestick_daily', INTERVAL '3 weeks');When you call add_tiering_policy, chunks fully older than the supplied interval are frozen and queued for upload
to object storage in the background.
Create a tiering policy with an integer-based time column
Section titled “Create a tiering policy with an integer-based time column”SELECT add_tiering_policy('events', BIGINT '1000000');Manually tier an individual chunk
Section titled “Manually tier an individual chunk”SELECT tier_chunk('_timescaledb_internal._hyper_1_1_chunk');Bring a tiered chunk back into local storage
Section titled “Bring a tiered chunk back into local storage”CALL untier_chunk('_hyper_1_1_chunk');Remove a tiering policy
Section titled “Remove a tiering policy”SELECT remove_tiering_policy('assets_candlestick_daily');Removes the existing tiering policy from the assets_candlestick_daily hypertable. Chunks already uploaded to
object storage remain tiered.
Available functions
Section titled “Available functions”add_tiering_policy(): create a policy to tier chunks older than a given intervalremove_tiering_policy(): remove the tiering policy from a hypertable or continuous aggregatetier_chunk(): manually tier an individual chunk to object storageuntier_chunk(): move a tiered chunk back to local storagedisable_tiering(): disable tiering on a hypertable and remove its object storage catalog entries