Repository navigation
Description
Is there an existing issue for performance?
- I have checked the existing issues.
#30569 tracks benchmark/profiling delivery; #30716 records all-memory results and public profiles. This umbrella owns the optimization backlog. Existing #27753 canonical-hash work and #16387 immutable cache references remain related work.
Environment
- Historical source pins: MO
873282742714436bff407dfcdbbe879147162bd3; DuckDB 1.5.6069cc9f9b5be802405797faecc284961b07c70ef; workerf881dfc604c11c29067ec5ccfcabbeeb357f40bc. Qualification Q1-Q22, original decimal schema, full Q15 create/select/drop lifecycle and complete result consumption.
Measurement correction — 2026-10-27: The historical worker f881dfc604c11c29067ec5ccfcabbeeb357f40bc validated declared dataset/result schemas and query metadata, then normalized, counted, serialized and SHA-256-hashed result rows during timed execution (legacy manifest checks and timed result capture). The query replays did not run full input-table verification or compare results against a reference. Earlier statements that these runs performed no schema checks or result hashing were wrong. Their recorded times include client capture work; its effect on the comparisons has not been quantified. Subsequent benchmarks must execute and drain without these checks or capture.
- Historical workstation SF10/SF100 mixed-I/O and SF10 all-memory: Ryzen 7950X3D, eight physical application cores, 32 GiB whole-application cap, no application swap. The original SF10 all-memory scores used a 512 MiB CN cache. Later isolated fix comparisons used a metric-verified 16 GiB cache within the same 32 GiB cap; these are different configurations.
- Historical SF100 all-memory: server129, dual Xeon Silver 4314, 32 physical/64 logical CPUs, both engines use all 64 logical CPUs, NUMA interleave, equal 200 GiB whole-application caps, MO CN SHARED capacity 192 GiB, DuckDB internal limit 160 GiB, no swap. Shared-host/PSI limitations and exact builds are in [Performance]: TPC-H all-memory comparison — MO vs DuckDB SF10/SF100 results and CPU profiling #30716.
- Images in private tmpfs, services/client, caches and workspaces are charged to the application. File residency is not decoded-vector residency. Configure future cache capacity against the actual working set and complete budget, and record the effective TOML/metric values.
- 2026-10-26 reassessment: reread existing score/resource/plan metadata, all-query exclusive CPU tables and SF10 callchains; re-symbolized the archived SF100 Q9 raw recording with SHA-verified exact ELFs. No new query, data load or benchmark was run, and no input/result verification was performed. Historical profiles are not post-fix current-main profiles.
Details of Performance
Profile reassessment 2026-10-26
The hotspots remain evidence; the first proposed implementations were hypotheses. The failed experiments expose missing cost and caller attribution, not permission to waive regressions or abandon the bottlenecks. In particular, generic copy leaves were assigned too broadly to the unique-join gather path, and global group cardinality was treated as if it established per-batch update locality.
Historical suite observations remain: mixed-I/O MO/DuckDB elapsed ratios were 7.33x at SF10 and 7.41x at SF100; all-memory ratios were 5.64x and 5.14x. These are warm engineering comparisons for their pinned builds/configurations, not current-main scores or a language-level Go/C++ penalty. SF10 and SF100 use different hosts/resources and are not a scaling curve.
Exact exclusive-leaf recheck. Shares below use each captured user-sample denominator. CPU seconds are approximate profile-user-CPU allocations per query, normalized by completed calls; they are not scored elapsed seconds, a removable fraction or a predicted speedup.
| Historical workload | Leaf mechanism | Exclusive user share | Approx. profile user CPU s/call |
|---|---|---|---|
| SF10 Q1 | group key encoding |
3.63% | 0.483 |
| SF10 Q18 | D64 grouped batch fill |
23.83% | 1.313 |
| SF10 Q9 | unionT[int32] selection copy |
0.04% | 0.002 |
| SF10 Q9 | Vector.UnionOne |
8.42% | 0.391 |
| SF100 Q1 | group key encoding |
3.00% | 17.277 |
| SF100 Q18 | D64 grouped batch fill |
32.61% | 97.204 |
| SF100 Q9 | unionT[int32] selection copy |
17.90% | 62.201 |
| SF100 Q9 | Vector.UnionOne |
10.24% | 35.591 |
SF100 Q9 caller attribution changes the materialization task. The reanalysis reconciles all 33,969 samples / 343,121,208,690 sampled ns with the existing leaf totals. All samples in the unionT[int32] family have ShufflePool -> BatchSet.Union callers. int32 denotes selection indices, not SQL payload width. Summing a separate defer leaf explains the 17.96% family versus the 17.90% main leaf above.
| Exclusive leaf family | Caller/owner | Share of all user samples | Consequence |
|---|---|---|---|
unionT_int32 |
shuffle_batchset |
17.96% | Shuffle selection materialization; includes the separate defer leaf. |
UnionOne |
hashjoin_appendUniqueMatches |
2.69% | Unique-join build-row path; eligible fixed-payload fraction is not established. |
UnionOne |
other_hashjoin |
6.92% | Other join callers; the unique-join helper does not cover these paths. |
memmove |
decoded_cache_copy |
2.71% | Decoded-cache hit materialization; coordinate #30849/#16387. |
Only 26.27% of UnionOne leaf weight belongs to appendUniqueMatches; 67.55% is in other hash-join call paths. About 65.76% of memmove leaf weight is decoded-cache copying. Payload types, match/source-run distributions and current remaining cost must be established before selecting an implementation. Existing full-batch transfer, copy ownership and merged #31081 wide-selection copies are part of the baseline.
Foreground and maintenance must be separated in attribution. SF10 Q9 callchains place only 67 of 229 UnionOne samples under appendUniqueMatches; other samples include generic join probing and mergesort. SF10 Q1/Q18 UnionOne samples are under background mergesort. Across the reviewed SF10 captures, explicit mergeObjectsTask ancestry accounts for 11.27% / 7.10% / 7.82% of Q1/Q9/Q18 user samples respectively. Excluding a cold run and recording zero physical I/O do not establish maintenance quiescence. These costs still belong to whole-application accounting, but cannot all be called query-join materialization. This observation is from separate profiled replays; it does not establish maintenance activity in every scored window. Record matched maintenance state and distinguish foreground/background/kernel/wait work before causal claims. Use quiescent prepared images for a steady foreground comparison, or label retained maintenance explicitly; never silently subtract it from whole-application accounting.
Aggregation remains a large target, but the algorithm is not selected by a profile. Q18's D64 batchFill share is about 23.83% at SF10 and 32.61% at SF100. Its 150M global groups do not determine repetition or destination-chunk locality inside a real 256-row call. The original direct-update experiment lost useful combining and regressed sparse inputs by about 182%. The current local single-chunk/prefix revision has no complete performance acceptance. Require actual update-shape evidence, then compare total proof/setup/update/state costs.
Work-elimination evidence is stronger than a leaf-based implementation guess. Captured Q15 duplicates an expensive producer that DuckDB shares; its RANK rewrite is a bundled diagnostic, not a reuse-only speedup. Q20 forms 54.54M MO intermediate groups versus 0.593M after DuckDB candidate restriction; this proves different work, not a 92x wall-time opportunity. Both captured Q18 plans scan LINEITEM twice, so #30857 is an additional structural hypothesis rather than a demonstrated DuckDB advantage.
Decode, system CPU and critical path remain separate questions. Zero physical I/O does not remove decode/copy work. rchar, a capacity setting and an unscored cache-occupancy pilot cannot prove a cache-miss cause; pinned Q9 callchains show a decoded hit-copy path is active. User-only leaves do not explain the roughly 90.26/55.97 system CPU seconds in SF100 Q18/Q20. Busy-CPU ratios and native wait-timer labels do not diagnose scheduling. Lower occupancy can be an improvement when less work is done.
Current delivery and experiment ledger
Original #30880/#30884/#30885 component failures are historical. Merged corrections #30981/#30971/#30983 report isolated local SF10 target/control/full-suite acceptance for their respective changes; this does not close the broader optimization tasks or establish SF100/mixed-I/O completion. #31034 remains open and later correctness revisions do not inherit an earlier candidate's performance PASS. #30886's final merged change withdraws the production SUM optimization; it is not the original regressing range-index implementation.
Author-retained independent component confirmation, with identical compiled test fixtures and one candidate per clean-main comparison, rejects these unpublished variants:
| Variant / baseline | Control | Main -> candidate ns/evaluation | Paired slowdown |
|---|---|---|---|
CHAR f9a1cb7c46 / 289d58b6f1 |
256-row constant | 8,768 -> 8,957.5 | +2.10% |
| Same CHAR variant | 256-row grouping | 13,996 -> 14,240 | +1.61% |
| Same CHAR variant | Empty | 44.18 -> 55.66 | +25.99% |
Gather e577638069 / aeaa273daf |
Late unsupported provenance | 16,102.5 -> 16,769 | +4.15% |
| Same gather variant | Same source | 845.5 -> 857.2 | +1.57% |
| Same gather variant | One match | 81.04 -> 87.515 | +7.96% |
These are component timings, not TPC-H regressions. Confirmation uses ten balanced independent process pairs, 1 s/case, CPU0/GOMAXPROCS=1, GOAMD64=v3/GOEXPERIMENT=simd, first per-case results excluded and compiler-free windows. All reported variants have zero allocations in these controls. A late unsupported gather performs preparation before falling back; the exact instruction-level causes of every CHAR/cheap-path slowdown remain unisolated. The early escaping 2 KiB gather selection was fixed; it does not explain the remaining zero-allocation regressions.
An earlier SUM prototype e22849042f versus 9728d699fd passed its component matrix and a six-pair SF10 Q1/Q18 probe (Q18 paired estimate -6.79%, Q1 no directional signal). That is scoped prototype evidence, not current local revision b648d0865d, full Q1-Q22 or SF100 acceptance. The next current-main matrix was interrupted by Rust builds after five clean pairs and is inconclusive; the new revision has functional/race/static proof only. No new optimization PR is published for these three local experiments.
Performance acceptance
- Freeze the named bottleneck, source/executable identities, real callers and effective settings. Rebaseline after prerequisite merges; do not tune a historical hotspot that has already changed.
- Establish caller, representation and work counts before selecting a mechanism. Separate equal-work kernel cost from fewer scans/probes/groups/copies; separate query operators, background maintenance, kernel CPU and genuine waits. Use absolute CPU/instructions and work-normalized costs, not only changing percentages.
- Cost successful, rejected, fallback, setup, empty/tiny/constant/NULL and already-fast routes before delivery. Include code/dispatch, scans/indexing, conversion, allocations, copies and retained lifetimes. Use actual 256-row callers where applicable; large-call controls are separate.
- Require attributable named-work reduction and uninstrumented target-query improvement. A source change, microbenchmark win, profile share, plan change, functional/SCA pass, approval or merge does not complete the performance issue.
- Every confirmed affected/control slowdown fails; unresolved suspected slowdowns are inconclusive. Confirm with longer independent balanced runs; retain uncertainty and all samples. No favorable average, gain elsewhere, self-approved tolerance or diagnostic-overhead exception waives it.
- Match host/image, CPU/NUMA/thread settings, total application cap and effective cache. Exclude cold runs; keep profiling separate. Account for images, caches, clients/services, native/Go allocation and workspaces. All-memory acceptance requires zero measured physical I/O/spill/swap, no OOM or sustained pressure failure; record missing PSI/attribution limits.
- Compare one isolated candidate with matching main. Complete Q1-Q22 regression comparison and applicable SF10/SF100 memory/mixed-I/O campaigns before issue closure. Publish scoped PASS/FAIL/INCONCLUSIVE/NOT YET MEASURED/WITHDRAWN statuses separately from functional validation.
- Use unchanged qualification SQL including Q15 lifecycle and complete consumption. Benchmark scripts collect completion/resources, not input/table/schema/row-count/reference/result/checksum verification. Semantic changes are tested separately with focused UT/BVT. Material owner/API/format/state/hot-path changes require the applicable reviewed design.
Subtasks and sequencing
The umbrella now has 21 linked subtasks. Existing issue metadata and relationships are preserved; the three new s0 entries are assigned to aunjgr and use the subtask template.
- Finish current decimal correctness/baseline work and reassess remaining costs after merged fixes. Start caller/update-shape/cache/foreground/system/critical-path diagnosis in [Subtask]: Attribute and reduce shuffle/join vector materialization cost #30845/[Subtask]: Reduce grouped SUM/AVG cost for measured update-locality shapes #30847/[Subtask]: Reduce measured decoded-cache reconstruction and copy cost within budget #30849/[Subtask]: Attribute and reduce allocation, minor-fault and kernel CPU costs in warm execution #30851/[Subtask]: Attribute warm-query critical paths and scaling limits before scheduling changes #30852 before another implementation guess.
- Design the strongest remaining work-elimination opportunities in [Subtask]: Reuse repeated aggregate producers and filter before wide joins in Q15-shaped plans #30842/[Subtask]: Restrict grouped correlated subqueries to candidate keys before aggregation #30843/[Subtask]: Reduce hash-join input with effective runtime filters and build/probe choices #30844 and the actual caller-specific materialization costs; prove eligibility and include negative controls. These are opportunities, not measured future gains.
- Select per-work kernels, compact keys, cache policy and scan changes from current measured distributions. Preserve useful combining and existing cheap transfers; compare each implementation independently rather than accumulating changes in a mixed candidate.
- Treat [Subtask]: Reuse grouped aggregate results across qualification and final projection #30857-[Subtask]: Fuse eligible expression and aggregate loops with measured SIMD specialization #30860 as additional structural designs with reachable eligibility and total-plan cost proofs. Continue the separate bounded mixed-I/O policy track in [Subtask]: Make local file-page discard policy bounded and reuse-aware #30848. No fixed issue count, predicted parity factor or hypothetical performance ceiling is a stopping rule.
| Subtask | Revised objective | Current issue-level status |
|---|---|---|
| #30839 | Hoist invariant decimal cast metadata and scale proofs out of row loops | Merged correction #30981; issue-level remaining validation open |
| #30840 | Preserve sound decimal domains and avoid unnecessary wide arithmetic | Merged correction #30983; #31034 open; current-head acceptance pending |
| #30841 | Reduce grouping-key and state cost for proven small domains | CHAR prototype rejected; current mechanism must be reselected from evidence |
| #30842 | Reuse repeated aggregate producers and filter before wide joins in Q15-shaped plans | Workload-specific diagnosis/design and complete acceptance open |
| #30843 | Restrict grouped correlated subqueries to candidate keys before aggregation | Workload-specific diagnosis/design and complete acceptance open |
| #30844 | Reduce hash-join input with effective runtime filters and build/probe choices | Workload-specific diagnosis/design and complete acceptance open |
| #30845 | Attribute and reduce shuffle/join vector materialization cost | Gather prototype rejected; scope corrected to shuffle and join callers |
| #30846 | Reduce normalized hash-probe and key-preparation CPU cost | Workload-specific diagnosis/design and complete acceptance open |
| #30847 | Reduce grouped SUM/AVG cost for measured update-locality shapes | Original optimization withdrawn; local revision functionally tested, performance unmeasured |
| #30848 | Make local file-page discard policy bounded and reuse-aware | Workload-specific diagnosis/design and complete acceptance open |
| #30849 | Reduce measured decoded-cache reconstruction and copy cost within budget | Attribution overhead corrected by #30971; decoded reuse/copy optimization open |
| #30850 | Reduce scan predicate materialization, repeated compaction and type-invariant decode work | Workload-specific diagnosis/design and complete acceptance open |
| #30851 | Attribute and reduce allocation, minor-fault and kernel CPU costs in warm execution | Causal diagnosis before implementation |
| #30852 | Attribute warm-query critical paths and scaling limits before scheduling changes | Causal diagnosis before implementation |
| #30857 | Reuse grouped aggregate results across qualification and final projection | Structural hypothesis; eligibility and total-cost proof required |
| #30858 | Design compact column encodings with encoding-aware filtering and aggregation | Structural hypothesis; eligibility and total-cost proof required |
| #30859 | Exploit proven grouping-key order with costed streaming aggregation | Structural hypothesis; eligibility and total-cost proof required |
| #30860 | Fuse eligible expression and aggregate loops with measured SIMD specialization | Structural hypothesis; eligibility and total-cost proof required |
| #31138 | Reduce outer-join COUNT materialization with proven preaggregation | New evidence-backed opportunity; semantic/cost design and performance measurement pending |
| #31139 | Share conditional witness summaries for paired EXISTS and NOT EXISTS | New evidence-backed opportunity; semantic/cost design and performance measurement pending |
| #31140 | Reduce exact IN and NOT IN set construction and lookup cost | Completed by #31257; functional qualification and local SF10 Q17 gain recorded; requester directed closure after Q7 causal clarification |
Additional opportunities 2026-10-26
- [Subtask]: Reduce outer-join COUNT materialization with proven preaggregation #31138: Q13-shaped outer COUNT preaggregation. Both captured engines currently expand about 153.38M join rows before counting 15M customer groups. Prove null extension/multiplicity and full cost; this is not existing-measure reuse or aggregate elimination.
- [Subtask]: Share conditional witness summaries for paired EXISTS and NOT EXISTS #31139: Q21-shaped shared conditional witness summaries. Existing SEMI/ANTI plans already exist; investigate reducing their repeated witness-source scans/probes. Preserve the outer candidate bag and bound summary memory; do not claim that all three scans disappear.
- [Subtask]: Reduce exact IN and NOT IN set construction and lookup cost #31140: exact SQL IN/NOT IN set representation. SF10 Q17 map lookups are attributed to the membership operator; SF100 uses a different hash-join path. The operator already caches its map, so this task measures representation/build/lookup choices, not a duplicate caching feature.
All three are design/validation opportunities with explicit unknowns and negative controls, not measured future speedups. Existing reports #31024 (ordinary grouping scratch/raw-string dispatch) and #31054 (string-append NULL-prefix scans) are related baseline work and were cross-linked rather than recreated. Preserve the common performance gate and compare each candidate independently.
Historical 2026-10-23 component rejection samples — original variants, not current-main status
These are component measurements, not whole-query latency. Each list is aligned by paired process generation. All samples are retained. CPU0/GOMAXPROCS=1, Linux/amd64 Go 1.27.1, GOAMD64=v3 and GOEXPERIMENT=simd. Confirmation uses ten balanced independent pairs and 300 ms per case, following a separate 54-case discovery matrix. Cold fixture initialization is excluded from b.Loop; no builds/tests overlap timing.
Cast comparison restores only the five pre-#30880 bodies from source 1daa5e459bf5f58a9b21218a1082cb1a5bdf5562; the candidate function source is at d8938d60dc96e808cfe132aaf9837ce603412864 with #30880 included. Each cast fixture has 256 flat NULL entries (all NULL bits set), input coefficient 1234 at scale 2, target scale 4. Declared precision pairs: D64 12->14, D128 20->22, D256 40->42, D64->D256 12->14, D128->D256 20->22. D64->D128 12->14 is the unchanged control. Timed calls use the existing public NewCast/function-case dispatcher. Allocations are unchanged; the unchanged control has p=0.065, while affected all-NULL cases have p<=0.001.
| Case | Before samples (ns) | After samples (ns) |
|---|---|---|
| BenchmarkAuditCasts/128to256/allnull | 2429, 2430, 2429, 2428, 2432, 2420, 2430, 2426, 2439, 2624 | 2507, 2504, 2506, 2508, 2503, 2503, 2513, 2503, 2515, 2499 |
| BenchmarkAuditCasts/64to128_control/allnull | 2437, 2441, 2427, 2442, 2426, 2402, 2401, 2429, 2421, 2414 | 2416, 2423, 2417, 2416, 2406, 2424, 2411, 2414, 2395, 2411 |
| BenchmarkAuditCasts/64to256/allnull | 2420, 2416, 2416, 2416, 2417, 2424, 2414, 2420, 2419, 2418 | 2448, 2458, 2449, 2453, 2454, 2453, 2447, 2447, 2452, 2441 |
| BenchmarkAuditCasts/d128/allnull | 2408, 2362, 2363, 2360, 2362, 2369, 2361, 2361, 2359, 2367 | 2449, 2459, 2443, 2448, 2444, 2448, 2443, 2445, 2450, 2452 |
| BenchmarkAuditCasts/d256/allnull | 2484, 2412, 2410, 2405, 2412, 2397, 2401, 2411, 2400, 2400 | 2481, 2488, 2476, 2477, 2475, 2476, 2492, 2476, 2471, 2475 |
| BenchmarkAuditCasts/d64/allnull | 2294, 2381, 2393, 2377, 2385, 2372, 2378, 2383, 2381, 2379 | 2396, 2397, 2407, 2392, 2405, 2405, 2396, 2409, 2395, 2395 |
Multiply compares the pre-#30885 arithmetic sources from 517a0a412ba5f3b52e6abe722c9675a3d72491af with the same candidate d8938d60dc96e808cfe132aaf9837ce603412864. Public multiFn, one non-NULL row in flat Decimal256 operands, scale 0, declared precision p9/p18/p38/p38, result precision min(2p,65). Coefficients: p9/unknown-small 12345; p18 123456789012345; wide 123456789012345678901234567890. Multiplication allocations remain zero. Unknown/wide regression p<0.001; p18 p=0.021; p9 slightly improves (p=0.016) and is not a finding.
| Case | Before samples (ns) | After samples (ns) |
|---|---|---|
| BenchmarkAuditMul/p18/one | 104.6, 102.7, 102.9, 104.7, 102.6, 103.1, 103.1, 103.2, 103.1, 102.8 | 104.1, 104, 103.9, 103.9, 103.8, 103.9, 104.2, 104.2, 104, 103.9 |
| BenchmarkAuditMul/p9/one | 100.6, 100.6, 100.7, 100.6, 100.6, 100.7, 101, 100.8, 100.7, 101.9 | 100.7, 100.5, 100.3, 100.4, 100.5, 100.3, 100.4, 100.7, 100.8, 100.3 |
| BenchmarkAuditMul/unknown_small/one | 105.2, 106, 106.1, 105.3, 105.2, 105.4, 105.3, 105.6, 105.5, 107.2 | 108, 108, 108, 108.1, 108.9, 108.1, 108.2, 108.1, 108.1, 107.9 |
| BenchmarkAuditMul/wide/one | 113.6, 113.5, 113.7, 113.6, 113.6, 113.6, 113.5, 114, 113.5, 113.5 | 117.1, 116.9, 116.9, 117, 116.9, 116.9, 117.2, 117.2, 117.2, 116.9 |
#30884's already-published constructor evidence uses ten balanced pairs, 200 ms per case, identical native/Go build settings and a 16 KiB serialized integer column. Both cases have p<0.001 and unchanged 96 B / 1 allocation per construction. Their unconditional context/global atomic-counter work has no approved performance exception. Those component findings are not cleared by the separate single Q6 PMU pair.
| Case | Before samples (ns) | After samples (ns) |
|---|---|---|
| BenchmarkColumnCacheConstructionAttribution/lz4 | 5658, 5592, 5581, 5593, 5583, 5573, 5580, 5561, 5592, 5592 | 5675, 5688, 5673, 5671, 5688, 5671, 5684, 5663, 5716, 5664 |
| BenchmarkColumnCacheConstructionAttribution/uncompressed | 918.8, 920.5, 921.3, 910.8, 937, 886.5, 915, 911, 917.8, 918.5 | 1012, 1004, 1002, 988.6, 999.8, 994.1, 991.9, 997.7, 996, 991.2 |
#30886's separate six-pair caller-sized reproduction and full table are in its PR description; hashmap.UnitLimit=256 is the caller boundary. The originally supplied 8192-row controls already had significant 1.97–2.49% slowdowns. Their average/high-cardinality win was not a valid acceptance override.
No new TPC-H campaign, data load or dataset/result verification was performed for this audit. Corrective PRs #30971, #30981 and #30983 have since merged; see the current ledger above. These scoped results do not assert that every TPC-H query regressed by the component percentages.
Additional information
- Mixed-I/O baseline and causal probes/pinned Go-C++ analysis.
- All-memory SF10 and all-query CPU evidence, SF100 score/resources/profiles, SF100 individual compressed recordings and exact ELFs.
- Reproduce Q9 caller attribution using its published
mo-q09-perf.data.zstand SHA-verified objects/recorded paths inprofile-index.json.zst. Runperf script --symfs <symfs> --no-inline -F pid,tid,time,period,event,ip,sym,dso -i mo-q09-perf.datawithout-G, which hides callgraphs. Sum exclusive leaf periods by caller; do not add overlapping cumulative frames. The reconciled sample/period totals are above. unionTselection-index signature, current-baseline ShufflePool, BatchSet selection materialization, decoded-cache owned-copy boundary.- Cross-engine CPU/PMU values use OS accounting and completed-query normalization; native operator timers have different semantics. Exclusive-leaf coverage is high in SF100, but caller completeness, single replay/perturbation, shared-host conditions and unavailable SF100 kernel/PSI attribution remain limits. No current-main workload performance is claimed from this historical reanalysis.
Activity
8 remaining items
fix(logservice): preserve CN mutation budgets; test grouped SUM (#30886)
perf(vector): specialize wide fixed-width selection copies (#31081)
Remove per-row boolean wrapper calls from inline scan filters (#31306)
fix(plan): preserve precision of decimal intermediates (#31034)
aunjgr commentedon Nov 1, 2026
Two approved, independent candidates are implemented locally against main
c5c163cd2340110448fc2ef9c62042685aa9d773:perf/inline-constant-null(84f545ffb0): remove the redundant NULL bitmap population count and short-circuit scalar NULL classification. Go1.27.1 inline cost falls from 109 to 77; production caller disassembly confirms the flat-vector path avoids the helper call. Owning vector tests cover zero-length constants, physical NULL bit zero, unrelated bits, grouping and borrowed validity.perf/aggregate-decimal-fusion(6e8c6dfb2c): specialize only complete aggregate argument roots; generic expression constructors/evaluation helpers remain unchanged. Three owning packages and the real SUM/COUNT consumer pass, as do 18 SQL statements twice, prepared reuse/metadata, allocation failure/reuse and borrowed-validity preservation. Details are in [Subtask]: Fuse eligible expression and aggregate loops with measured SIMD specialization #30860.Scoped vet/lint report zero issues. These are implementation/compiler/functional results, not performance acceptance. A 55-second admission window remained blocked by an unrelated Cargo/Rust build; per the existing instruction those jobs were left running and timing deferred. No benchmark samples were scored, no PR was published, and no speedup/no-regression claim is made. Desktop affinity was restored and the test-owned service stopped. The old failed fusion prototype remains untouched.
Remaining: compiler-free local component controls and independent unchanged SF10 Q1-Q22 acceptance for each candidate (cold excluded, four balanced pairs, five warm calls/query, 16 GiB effective CN cache/32 GiB whole-app cap). Confirm slower signals independently; confirmed regressions block publication. Then fresh-main/full pre-push gates and separate template-based ready PRs. No broader SF100/mixed-I/O closure claim.
aunjgr commentedon Nov 1, 2026
Vector scalar-NULL candidate rejected by end-to-end controls, 2026-11-02
perf/inline-constant-null/84f545ffb0aeb2a0528c86ee9bbd3ed31e402215was measured independently against mainc5c163cd2340110448fc2ef9c62042685aa9d773. No fusion code was present.Do not publish this candidate. Compiler cost falls from 109 to 77 and the flat microbenchmark improves about 65%. Four qualified full Q1-Q22 pairs give Q21 -2.22% inconclusive, and an independent four-pair/16-warm-call check confirms Q21 -2.35% (-3.20% to -1.39%). But that longer run also confirms Q3 +1.33% (+1.31% to +2.86%), Q13 +1.46% (+0.10% to +2.08%) and Q20 +1.32% (+0.35% to +2.18%). The target gain does not waive these control regressions.
All 16 latency arms qualify under the unchanged resource gates, with cold calls excluded and no benchmark input/result verification. Functional/static tests pass, but performance acceptance fails. Keep the local branch and evidence; no PR is published for it.
The exact mechanism is unresolved. The candidate adds 23,296 bytes of executable text; vector-package compiler reports show only IsConstNull changing inline status. This is a diagnostic observation, not proof that code size caused the regressions. A matched Q3 CPU recording was attempted after all latency campaigns; a newly started unrelated Cargo/LLVM build prevented the post-warm quiet-window admission. No profile/query measurement window started. Those jobs were left running as previously instructed. Do not attribute the completed latency results to this later build.
A possible next design is to inline only the common flat-vector class guard and keep constant payload/validity handling in a shared function. It has not been implemented or qualified and is not a claimed fix.
Inline scalar NULL classification: independent SF10 full screen
State:
complete; qualified process pairs:[0, 1, 2, 3].Independent current-main/candidate normal release binaries, unchanged local TPC-H SF10 Q1-Q22 SQL and full result consumption. Eight physical CPUs (8-15), effective 16 GiB CN cache, 32 GiB whole-application cap. First/cold calls excluded; five warm calls/query/arm in this full screen. Benchmark scripts execute/drain only and do not verify inputs, schemas, rows or results. Profiles are separate from latency.
Each process pair contributes the ratio of its warm-call medians. The table reports the median paired ratio and a small-sample paired bootstrap interval; inconclusive intervals do not prove equivalence. Slower screen signals require independent longer confirmation. No gains elsewhere waive a confirmed regression.
Source/executable pins:
c5c163cd2340110448fc2ef9c62042685aa9d773; ELF SHA-2568db813e2775ccee41dec390dd979aff6c221602c5e59e18bdfb4b004ac9887fa.84f545ffb0aeb2a0528c86ee9bbd3ed31e402215; ELF SHA-256b30ebf1fbced25fc411c84a54a5ae65c2b69774a20beb46a0234860d74aec014.Resource receipts for completed arms:
Scored warm calls in seconds
Inline scalar NULL classification: independent longer target/control confirmation
State:
complete; qualified process pairs:[0, 1, 2, 3].Independent current-main/candidate normal release binaries, unchanged local TPC-H SF10 SQL and full result consumption. Eight physical CPUs (8-15), effective 16 GiB CN cache, 32 GiB whole-application cap. First/cold calls excluded; repetitions and query selection are recorded in the protocol. Benchmark scripts execute/drain only and do not verify inputs, schemas, rows or results. Profiles are separate from latency.
Each process pair contributes the ratio of its warm-call medians. The table reports the median paired ratio and a small-sample paired bootstrap interval; inconclusive intervals do not prove equivalence. Slower screen signals require independent longer confirmation. No gains elsewhere waive a confirmed regression.
Source/executable pins:
c5c163cd2340110448fc2ef9c62042685aa9d773; ELF SHA-2568db813e2775ccee41dec390dd979aff6c221602c5e59e18bdfb4b004ac9887fa.84f545ffb0aeb2a0528c86ee9bbd3ed31e402215; ELF SHA-256b30ebf1fbced25fc411c84a54a5ae65c2b69774a20beb46a0234860d74aec014.Resource receipts for completed arms:
Scored warm calls in seconds
aunjgr commentedon Nov 1, 2026
Ready PR #31987 delivers the independent aggregate-root decimal fusion candidate. Local Q1 median paired latency improves 2.62%; the complete evidence retains all query intervals and the inconclusive positive Q11/Q18/Q21 estimates. Full pre-push checks pass; broader SF100/mixed-I/O acceptance remains open.
The separate vector predicate candidate stays unpublished: independent longer controls confirm Q3/Q13/Q20 regressions despite a Q21 speedup. Rejection evidence and raw warm calls. Its attempted CPU diagnostic was deferred when a new unrelated Cargo/LLVM build blocked admission after the latency campaigns; no profile or causal explanation is claimed. Both old failed branches/evidence are preserved.
aunjgr commentedon Nov 1, 2026
Ready vector PR #31988 delivers selected-row NULL reuse at constant projection, keeping global scalar NULL helpers unchanged. Q21 improves3.55% in independent targeted controls and3.72% in the four-qualified-pair full screen. All real projection component modes improve. Complete raw data, exclusions, source/ELF pins and retained Q4 uncertainty. Broader issue acceptance stays open.
The vector fix is delivered. CI work is now in progress: #31987's Ubuntu race test exposed an incorrect test getter interpreting a Decimal256 SUM carrier as Decimal128; the correction preserves production arithmetic and measured code.
aunjgr commentedon Nov 3, 2026
Current-main rebaseline from the 2026-11-03 SF10 profiles
Detailed investigation, source links, measured budgets and counterexamples. New result issues: #32072 (disk-backed) and #32073 (all-memory); both now have integrated Total rows containing wall time, CPU and ratios. This is a profiling round, not fresh candidate acceptance.
Important current-state corrections/decisions:
Suggested bounded first wave: non-JSON check hoisting; constant CHAR predicate specialization; then small-group aggregate addressing with exact fallbacks. Larger design work should focus on bounded cache admission and actual shuffle-filter exposure. Every change still needs its agreed target/control wall-time gate; no observed CPU budget, favorable average or improvement elsewhere waives a confirmed regression.
No kernel code, issue state/labels or benchmark workload was changed in this investigation. SF100 remains deferred to server129 when available.
aunjgr commentedon Nov 8, 2026
The approved execution series now has a design-only PR #32380, version
adebe845cb4a77d97cf7dd0ae4b2efaf87dc224a: early runtime-filter domains and dictionary-vector execution.Implementation starts with replacing #32098's shuffle-only hook with complete domains from independent filtered scans. The engine-wide dictionary stages are tracked in #32379. Neutral foundations are allowed; producer enablement requires the predeclared target-query gain. SF10/SF100 qualification applies; Q15/Q20 rewrites and SF1000 are outside this wave. Existing issue descriptions and performance evidence remain unchanged. No new benchmark result is claimed.