Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions use-timescale/data-tiering/querying-tiered-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|
```
Expand All @@ -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.

</Procedure>
1. List the hypertables that have tiering enabled:

```sql
select * from timescaledb_osm.tiered_hypertables;
```

</Procedure>

## Enable querying tiered data in all future sessions

Expand All @@ -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;
```

</Procedure>


## 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure where this text was copied from. The text for lines 111-113 and the result of this query don't make sense together (lines 102-107).
I suggest going back to "Tour of data tiering" (suspect that is the original source) and fix this text with the correct context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you

```sql
chunk_name | range_start | range_end
------------------+------------------------+------------------------
Expand Down