Create distributed hypertables
If you have a multi-node environment, you can create a distributed hypertable across your data nodes. First create a standard PostgreSQL table, and then convert it into a distributed hypertable.
important
You need to set up your multi-node cluster before creating a distributed hypertable. To set up multi-node, see the multi-node section.
Creating a distributed hypertable
On the access node of your multi-node cluster, create a standard PostgreSQL table:
CREATE TABLE conditions (
time TIMESTAMPTZ NOT NULL,
location TEXT NOT NULL,
temperature DOUBLE PRECISION NULL,
humidity DOUBLE PRECISION NULL
);
Convert the table to a distributed hypertable. Specify the name of the table you want to convert, the column that holds its time values, and a space-partitioning parameter. For more information about space partitions, see the space-partitioning section.
SELECT create_distributed_hypertable('conditions', 'time', 'location');
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .