v.23.12New Feature

Primary Key Analysis Enhancement for MergeTree Tables with _part_offset

The primary key analysis in MergeTree tables will now be applied to predicates that include the virtual column _part_offset (optionally with _part). This feature can serve as a special kind of a secondary index. #58224 (Amos Bird).
The primary key analysis in MergeTree tables has been extended to support predicates involving the virtual column _part_offset, optionally combined with _part, enabling a special form of secondary indexing.

Why it matters

This feature allows more efficient query filtering by leveraging the primary key conditions on virtual columns that represent part offsets and part names. It effectively acts as a special secondary index, improving query performance for predicates using _part_offset and _part.

How to use it

Users can take advantage of this feature by including predicates on the virtual column _part_offset and optionally _part in their WHERE clauses when querying MergeTree tables. No explicit configuration is needed; it works automatically during primary key predicate analysis.