Skip to content

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.

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');
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');
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.