timescaledb_information.hypertables

Get metadata information about hypertables.

Available Columns

NameDescription
hypertable_schema(NAME) Schema name of the hypertable
hypertable_name(NAME) Table name of the hypertable
owner(NAME) Owner of the hypertable
num_dimensions(SMALLINT) Number of dimensions
num_chunks(BIGINT) Number of chunks
compression_enabled(BOOLEAN) Is compression enabled on the hypertable?
is_distributed(BOOLEAN) Is the hypertable distributed?
replication_factor(SMALLINT) Replication factor for a distributed hypertable
data_nodes(NAME[]) Nodes on which hypertable is distributed
tablespaces(NAME[]) Tablespaces attached to the hypertable

Sample Usage

Get information about a hypertable.

  1. CREATE TABLE dist_table(time timestamptz, device int, temp float);
  2. SELECT create_distributed_hypertable('dist_table', 'time', 'device', replication_factor => 2);
  3. SELECT * FROM timescaledb_information.hypertables
  4. WHERE hypertable_name = 'dist_table';
  5. -[ RECORD 1 ]-------+-----------
  6. hypertable_schema | public
  7. hypertable_name | dist_table
  8. owner | postgres
  9. num_dimensions | 2
  10. num_chunks | 3
  11. compression_enabled | f
  12. is_distributed | t
  13. replication_factor | 2
  14. data_nodes | {node_1, node_2}
  15. tablespaces |