timescaledb_information.hypertables
Get metadata information about hypertables.
Available Columns
Name | Description |
---|---|
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.
CREATE TABLE dist_table(time timestamptz, device int, temp float);
SELECT create_distributed_hypertable('dist_table', 'time', 'device', replication_factor => 2);
SELECT * FROM timescaledb_information.hypertables
WHERE hypertable_name = 'dist_table';
-[ RECORD 1 ]-------+-----------
hypertable_schema | public
hypertable_name | dist_table
owner | postgres
num_dimensions | 2
num_chunks | 3
compression_enabled | f
is_distributed | t
replication_factor | 2
data_nodes | {node_1, node_2}
tablespaces |
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .