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).
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.