Projection Index Step 3: Support using normal projections as secondary index#81021
Merged
CurtizJ merged 7 commits intoClickHouse:masterfrom Nov 3, 2025
Merged
Projection Index Step 3: Support using normal projections as secondary index#81021CurtizJ merged 7 commits intoClickHouse:masterfrom
CurtizJ merged 7 commits intoClickHouse:masterfrom
Conversation
Contributor
7b8e1e4 to
2022cce
Compare
74b90ad to
dd7dc2d
Compare
This was referenced Jun 7, 2025
74913e7 to
2ca9333
Compare
1 task
Contributor
|
Hi! Just curious, is this feature still planned for release soon? |
Collaborator
Author
This feature involves a relatively complex review, so it may take some time. It's currently pending review at #81526 |
2ca9333 to
0c7e240
Compare
Contributor
|
Workflow [PR], commit [c671b1c] Summary: ❌
|
404b994 to
cb31d33
Compare
cb31d33 to
2771328
Compare
Collaborator
Author
Not sure what this means. |
|
Looking forward to this feature, not sure how much longer 😒? |
CurtizJ
reviewed
Sep 26, 2025
Member
CurtizJ
left a comment
There was a problem hiding this comment.
Great PR! I've left some comments and questions.
Collaborator
Author
It seems CI is broken when trying to add |
CurtizJ
approved these changes
Oct 29, 2025
Collaborator
Author
[ 171221 ] {513fe965-8da1-4156-bd68-0da8611caaff} : Logical error: 'Trying to insert into runtime filter after it was marked as finished'. Seems related to runtime filter. |
Merged
via the queue into
ClickHouse:master
with commit Nov 3, 2025
b7cefca
122 of 124 checks passed
1 task
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
This PR allows using normal projections as a secondary index. When enabled, certain query predicates can be used to read from projection parts and generate bitmaps to filter rows efficiently during the PREWHERE stage. This is the third step to implement projection index, following #80343.
Documentation entry for user-facing changes
Details
This also provides some references for the future implementation of #75774.
Two new settings are introduced to control this optimization:
max_projection_rows_to_use_projection_index: If the estimated number of rows to read from the projection is <= this value, projection index can be applied.min_table_rows_to_use_projection_index: If the estimated number of rows to read from the table is >= this value, projection index will be considered.These thresholds help balance projection index usage with its overhead in less selective queries.
Currently only point-type projection indexes are supported. Inverted projections (e.g.,
Array(_part_offset)) will be in next step.