Timescaledb: Get chunk time interval

Created on 11 Jun 2018  路  5Comments  路  Source: timescale/timescaledb

Hello !

Is there any way to get an existing chunk time interval and the current chunk time interval ?

thanks !

question

Most helpful comment

Please see http://docs.timescale.com/latest/api#chunk_relation_size_pretty. E.g.

SELECT chunk_table, partitioning_columns, ranges FROM chunk_relation_size_pretty('<HYPERTABLE NAME>');

All 5 comments

Please see http://docs.timescale.com/latest/api#chunk_relation_size_pretty. E.g.

SELECT chunk_table, partitioning_columns, ranges FROM chunk_relation_size_pretty('<HYPERTABLE NAME>');

Perfect, it worked, thanks :)

If the hypertable is created just, we still can't get the chunk time.

@jianhaiqing if you run SELECT * FROM chunk_relation_size_pretty('cpu'); w4and sub cpu for the name of your hypertable you will get the chunk ranges... have you tried that?

In 2.x you want

SELECT * FROM timescaledb_information.chunks;
Was this page helpful?
0 / 5 - 0 ratings