timescaledb_information.hypertables

Get metadata information about hypertables.

Available Columns

NameTypeDescription
hypertable_schemaTEXTSchema name of the hypertable
hypertable_nameTEXTTable name of the hypertable
ownerTEXTOwner of the hypertable
num_dimensionsSMALLINTNumber of dimensions
num_chunksBIGINTNumber of chunks
compression_enabledBOOLEANIs compression enabled on the hypertable?
is_distributedBOOLEANIs the hypertable distributed?
replication_factorSMALLINTReplication factor for a distributed hypertable
data_nodesTEXTNodes on which hypertable is distributed
tablespacesTEXTTablespaces 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 |