Repository navigation
Run the polymorphic_parts_l Buffer insert on 20 parts - #131888
alexey-milovidov merged 1 commit into
Conversation
Query 2 of polymorphic_parts_l.xml (INSERT through hits_buffer) takes 2.30 s on MasterCI amd and 4.22 s on arm. No existing query number or text changes: 1 query is disabled and 1 copy appended as 3, the same INSERT on numbers(20000), i.e. 20 parts of the same 1000 rows. Decision (deterministic, two repetitions on NUMA nodes 5 and 0, official amd release builds, both seat orders): - copy of query 2: per-part time 0.971 / 1.010 of the original's, per-part user time 1.005 / 1.026; on the MasterCI pair of ClickHouse#109000 (7a4e895 -> e523465) it keeps 1.002 / 1.097 of the original's client-time slowdown (original 1.217 / 1.214, copy 1.217 / 1.234). - query 0 (wide) is not replaced: on the ClickHouse#109454 pair (2485f14 -> 45cb837) its 20-part copy's per-part user time moved by 0.972 in one of four passes, and the rule asks for > 1 in every pass. hits_wide now receives 20 instead of 100 parts per run from the Buffer query, so a cost that grows with the parts already in the table, rather than per written part, is smaller in the copy. Saving: about 19 s of query time per master perf job on amd and 34 s on arm. 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 my own review (0 blocking findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261116-004500 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261115-224700 |
|
Workflow [PR], commit [fa66ef4] Summary: ✅
AI ReviewSummaryPR #131888 replaces the 100-part Final VerdictStatus: ✅ Approve |
870a541
Related: #129258
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Query 2 of
polymorphic_parts_l.xml, the INSERT throughhits_buffer, takes 2.30 s on MasterCI amd (4.22 s on arm); the wide and compact INSERTs take 1.68 and 0.32 s (3.09 and 0.44 s on arm). Each INSERT writes 100 parts of 1000 rows, 475 files per wide part of the hits schema, and the Buffer writes every block intohits_widewith its own nested INSERT: the costs the file measures.No existing query number or text changes: 1 query is disabled and 1 copy appended as 3. The copy is the Buffer INSERT on 20 parts of the same 1000 rows; the wide and compact queries keep their 100 parts. Per part, the copy's local time is 0.97-1.01x and its user time 1.01-1.03x its original's.
On the MasterCI builds before and after #109000, which made the Buffer's nested INSERT for every block more expensive (CI: query 2 user time 1.48x on amd, 1.65x on arm), the copy keeps 100-110% of its original's slowdown locally (both seat orders, two repetitions on different NUMA nodes). The wide query stays enabled: a 20-part copy of it missed the 4-14% per-part user time increase of #109454 (statistics for every written part) in one of four passes.
hits_widereceives 20 instead of 100 parts per run from the Buffer query, so a cost that grows with the parts already in the table, rather than per written part, is smaller in the copy.Projected CI time of the copy: 0.45-0.46 s on amd, 0.82-0.85 s on arm, saving about 19 s of query time per master perf job on amd and 34 s on arm. The copy restarts the history of 1 query.
Validation:
perf.pyruns only queries 0, 1 and 3, also with CI's--max-queries 10, with no run trend.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131888]
Version info
26.11.1.2416-master(included in26.11and later)