Repository navigation
Speed up grouped approximate distinct aggregation - #119594
alexey-milovidov merged 3 commits into
Conversation
alexey-milovidov
left a comment
There was a problem hiding this comment.
Interesting if it helps...
|
Workflow [PR], commit [e69adf1] Summary: ✅
AI ReviewSummaryThis PR adds specialized multi-place PR Metadata
Final Verdict✅ No blockers in code or test coverage from this review. Tighten the changelog wording before merge so the user-facing promise matches the optimized surface. LLVM Coverage Report |
…ti-place-prefetch
… `uniqCombined` clang-tidy rejects default arguments on override methods (`google-default-arguments`); the default lives on the base declaration. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119594&sha=a183c7755806e98d191eb70c24754126c9adfa35&name_0=PR&name_1=Build%20(arm_tidy) PR: ClickHouse#119594 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_014m2Q6bpWH9Ut8isMPmaKpt
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes12 object files changed (+1.33 MiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units19 translation units recompiled, 103 s compile time in total, 19 of them have a recent master baseline. |
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=6 K_base=30 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
|
It did. |
The 2048- and 4096-group entries of uniq_multi_place.xml (query indexes 5, 6, 12, 13, 19, 20) take 1.03-2.96 s on MasterCI amd and 1.15-2.58 s on arm; the three 4096-group ones are above report.py's 2 s single-run limit. Each group gets 16384 distinct values, so the time is the groups x 16384 single-threaded state insertions. No existing query number or text changes: the one query (21 entries) is disabled, and the same query over 64 to 1024 groups is appended as 21-35, byte-identical to entries 0-4, 7-11 and 14-18. The batched hash-and-prefetch insert of ClickHouse#119594 that the file measures already shows at 1024 groups. On the 457 master commits of 2026-09-12..24, with that path (before ClickHouse#117009 or after ClickHouse#120578) and without it (between the two), 1024 groups keep 95-128% of the 2048/4096-group speedup on amd, and on arm 91-97% of the 2048-group one and 69-88% of the 4096-group one (bootstrap p5 0.64, arm uniqCombined64). About 1 minute less query time per master perf job on each architecture. Related: ClickHouse#129258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Batch hashes and prefetch destination cells for grouped
uniqaggregations.Related: #117009
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Speeds up single-argument uniq, uniqCombined, and uniqCombined64 on common scalar types when aggregating many interleaved groups.
Workflow [PR]
Sync PR [sync-upstream/pr/119594]
Version info
26.9.1.1337(included in26.9and later)