ClickHouse / ClickHouse/ClickHouse

Calculate `minmax` index from primary key columns

Open
#65,849 4 comments 2 reactions 0 assignees View on GitHub
comp-mergetree feature performance
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

**Use case**

There is a `minmax` index for partition columns which is used for partition pruning. Usually it's not needed for primary key but the lazy loading of primary key is introduced since version 24.3 and it may be useful for pruning of parts in case if index is not loaded and `minmax` partition index is not applicable (or doesn't exist) to avoid reading the full index when it's not needed.

**Describe the solution you'd like**

`minmax` index is stored separately for each column of partition key and then a hyperrectangle is built from single values. The solution is to additionaly calculate `minmax` index for columns which are in primary key but not in partition key and build two hyperrectangles: for paritition key and for primary key.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.