Repository navigation
RFC: Optimize MarkRanges by using devector over deque - #86933
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [ba7d70e] Summary: ❌
|
Member
Author
And also: @thevar1able maybe we need some retries? |
Member
Author
Algunenano
approved these changes
Sep 11, 2025
Algunenano
left a comment
Member
There was a problem hiding this comment.
LGTM. I assume memory usage might be slightly higher but I don't see how that can be impactful
Member
Author
I thought about this as well, but, I am not sure that this is even the case, since with deque the memory fragmentation is higher as well |
azat
enabled auto-merge
September 11, 2025 10:40
mkmkme
added a commit
to Altinity/ClickHouse
that referenced
this pull request
Oct 24, 2026
Stable 25.8 Backport of ClickHouse#86933 - RFC: Optimize MarkRanges by using devector over deque
zvonand
added a commit
to Altinity/ClickHouse
that referenced
this pull request
Oct 25, 2026
Antalya 25.8 Backport of ClickHouse#86933 - RFC: Optimize MarkRanges by using devector over deque
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):
Improves performance of fast queries with lots of parts in table (by optimizing
MarkRangesby usingdevectoroverdeque)While reviewing #85535 I noticed that
MarkRangescopying is very slow, let's try to replace it with more efficient container (hope that we do not rely on iterators guarantees anywhere in the code)Test
clickhouse-benchmark -q 'select * from data where key = 1' -i 100Results
localhost:9000, queries: 100, QPS: 11.763, RPS: 11.763, MiB/s: 0.000, result RPS: 11.763, result MiB/s: 0.000.localhost:9000, queries: 100, QPS: 16.347, RPS: 16.347, MiB/s: 0.000, result RPS: 16.347, result MiB/s: 0.000.And when #85535 will be merged this will be moved to INSERT side: