Muayyad Alsadi
Muayyad Alsadi

Reputation: 1593

columns order in custom index in timescale hypertables

in their documentation after creating the hypertable with

SELECT create_hypertable('stocks_real_time', by_range('time'));

they suggest creating an index that have time component beside commonly queried column

CREATE INDEX ix_symbol_time ON stocks_real_time (symbol, time DESC);

typically in other databases the partition key (in this case time) has to be a prefix of the index.

why timescale do not mention this and only require it having time column in the index without being a prefix.

Upvotes: 0

Views: 60

Answers (0)

Related Questions