Skip to content

Commit

Permalink
fix: using the public API to check the chunk time interval for a hype…
Browse files Browse the repository at this point in the history
…rtable. (#3141)
  • Loading branch information
billy-the-fish authored Apr 18, 2024
1 parent 5ede50f commit dd9e6e6
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions use-timescale/hypertables/change-chunk-intervals.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ see [best practices for time partitioning][best-practices].
## Check current setting for chunk intervals

Check the current setting for chunk intervals by querying the Timescale
catalog:
catalog. For example:

```sql
SELECT h.table_name, c.interval_length
FROM _timescaledb_catalog.dimension c
JOIN _timescaledb_catalog.hypertable h
ON h.id = c.hypertable_id;
SELECT *
FROM timescaledb_information.dimensions
WHERE hypertable_name = 'metrics';

```

The result looks like this:
The result looks like:

```sql
table_name | interval_length
-----------+-----------------
metrics | 604800000000
(1 row)
hypertable_schema | hypertable_name | dimension_number | column_name | column_type | dimension_type | time_interval | integer_interval | integer_now_func | num_partitions
-------------------+-----------------+------------------+-------------+--------------------------+----------------+---------------+------------------+------------------+----------------
public | metrics | 1 | recorded | timestamp with time zone | Time | 1 day | | |
```

<Highlight type="note">
Expand Down

0 comments on commit dd9e6e6

Please sign in to comment.