Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
277 B
2
Indexable
Never
CREATE TABLE data_time (
    device_uuid uuid NOT NULL,
    generated_time TIMESTAMPTZ NOT NULL,
    normal_usage DOUBLE PRECISION NULL
);

SELECT create_hypertable('data_time', by_range('generated_time'));

CREATE INDEX id_time ON data_time (device_uuid, generated_time DESC);
Leave a Comment