diff --git a/use-timescale/data-tiering/querying-tiered-data.md b/use-timescale/data-tiering/querying-tiered-data.md index 9b19ed5686..b6f8842e29 100644 --- a/use-timescale/data-tiering/querying-tiered-data.md +++ b/use-timescale/data-tiering/querying-tiered-data.md @@ -37,7 +37,7 @@ as the data is not stored locally on the high-performance storage tier. See [Per This queries data from all chunks including tiered chunks and non tiered chunks: ```sql - ||count| + |count| |---| |1000| ``` @@ -58,8 +58,13 @@ All future queries within a session can be enabled to use the object storage tie All future queries in that session are configured to read from tiered data and locally stored data. - +1. List the hypertables that have tiering enabled: + + ```sql + select * from timescaledb_osm.tiered_hypertables; + ``` + ## Enable querying tiered data in all future sessions @@ -75,14 +80,26 @@ You can also enable queries to read from tiered data always by following these s In all future created sessions, `timescaledb.enable_tiered_reads` initializes with `enabled`. +1. List the hypertables that have tiering enabled: + + ```sql + select * from timescaledb_osm.tiered_hypertables; + ``` + + ## Query data in the object storage tier This section illustrates how querying tiered storage works. -Consider a simple database with a standard `devices` table and a `metrics` hypertable. After enabling tiered storage, you can see which chunks are tiered to the object storage tier: +Consider a simple database with a standard `devices` table and a `metrics` hypertable. After enabling +tiered storage, query for the hypertable chunks in the object storage tier: +```sql +select * from timescaledb_osm.tiered_chunks where hypertable_name = 'metrics' +``` +You see something like the following: ```sql chunk_name | range_start | range_end ------------------+------------------------+------------------------