Konstantina Skovola f059e00fad Create composite index on segmentby columns
Previously we created one index per segmentby column, of the form
`(col, _ts_meta_sequence_num)`.
Compressed data is ordered by segmentby, then by orderby within
the segments and lastly by the sequence number of the batch. So if
segmentby columns are missing from the index, that index cannot be
used to produce ordered output, requiring an extra sort step.

A composite index containing all segmentby columns removes the
additional sort step and gives better plans.

Fixes #4314
2022-06-03 11:41:01 +03:00
..

TimescaleDB TsL Library

The TimescaleDB TsL library is licensed under the Timescale License.