Repository navigation
Run the uniq_multi_place performance query for up to 1024 groups - #131785
Conversation
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]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus an own cold review (0 findings). Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261115-120000 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261115-114400 |
|
Workflow [PR], commit [1792d23] Summary: ✅
AI ReviewSummaryPR #131785, head Final VerdictStatus: ✅ Approve. |
1962958
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
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 the perf report's 2 s single-run limit. Each group gets 16384 distinct values, so their time is thegroups * 16384single-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 file measures the batched hash-and-prefetch insert of #119594, and 1024 groups already show it. On the 457 master commits of 2026-09-12..24 with that path (before #117009 or after #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 (the 69% is
uniqCombined64). At 64-128 groups the path changes nothing; it sets in at 256.This saves about 1 minute of query time per master perf job on each architecture. Checked locally with
perf.pyon the official MasterCI release build of the base, 8 pinned cores: each copy runs within 5% of its original, and no disabled entry runs. The copies restart the history of 15 sub-second queries.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131785]
Version info
26.11.1.2355-master(included in26.11and later)