Skip to content

Consecutive keys optimization for uniqExact - #93268

Merged
alexey-milovidov merged 1 commit into
masterfrom
uniq-exact-consecutive-keys-optimization
Dec 31, 2025
Merged

alexey-milovidov merged 1 commit into
masterfrom
uniq-exact-consecutive-keys-optimization

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Performance Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Optimize uniqExact in the case when identical elements often come consecutively.

@clickhouse-gh

clickhouse-gh Bot commented Dec 31, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e4e5203]

Summary: ❌

job_name test_name status info comment
AST fuzzer (amd_msan) failure
Received signal 6 (STID: 2042-0e62) FAIL cidb
BuzzHouse (amd_debug) failure
Logical error: 'Inconsistent AST formatting: the query: (STID: 1941-1bfa) FAIL cidb, issue
BuzzHouse (amd_tsan) failure
Logical error: Unexpected return type from A. Expected B. Got C. Action: (STID: 1611-3d19) FAIL cidb, issue

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Dec 31, 2025
@alexey-milovidov

Copy link
Copy Markdown
Member Author

It looks good. 14% on ClickBench query: https://s3.amazonaws.com/clickhouse-test-reports/PRs/93268/e4e5203baae1d250867a8cc41cb2f47ed151c5cc//performance_comparison_arm_release_master_head_4_6/report.html

Up to 35% on some tests: https://s3.amazonaws.com/clickhouse-test-reports/PRs/93268/e4e5203baae1d250867a8cc41cb2f47ed151c5cc//performance_comparison_arm_release_master_head_3_6/report.html

Typically 10..15%:
https://s3.amazonaws.com/clickhouse-test-reports/PRs/93268/e4e5203baae1d250867a8cc41cb2f47ed151c5cc//performance_comparison_arm_release_master_head_2_6/report.html
https://s3.amazonaws.com/clickhouse-test-reports/PRs/93268/e4e5203baae1d250867a8cc41cb2f47ed151c5cc//performance_comparison_arm_release_master_head_1_6/report.html

Obviously, there are degradations on uniformly random distributions, but only 10%:
https://s3.amazonaws.com/clickhouse-test-reports/PRs/93268/e4e5203baae1d250867a8cc41cb2f47ed151c5cc//performance_comparison_amd_release_master_head_5_6/report.html
https://s3.amazonaws.com/clickhouse-test-reports/PRs/93268/e4e5203baae1d250867a8cc41cb2f47ed151c5cc//performance_comparison_amd_release_master_head_3_6/report.html

@nickitat nickitat self-assigned this Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants