Repository navigation
Description
Is there an existing issue for performance?
- I have checked the existing issues.
This is a new, separately scoped profiling round following #30569 and #30716. Companion results: #32073. Those issues retain their historical results. This issue records local SF10 / disk-backed warm on the newly built main. server129/SF100 remains deferred.
Environment
- MO:
dd2499cdcdf2722848851d4debca6cd6c66b4751, fresh optimized native CPU build; Go 1.27.1,GOAMD64=v3 GOEXPERIMENT=simd,MO_SIRIUS=0 MO_CL_CUDA=0; optional jemalloc C++ shim disabled. - DuckDB: 1.5.6, pinned duckdb-go/v2 v2.10506.0 and native bindings v0.10506.0; the persistent execute-and-drain client uses those unchanged dependencies.
- CPU: AMD Ryzen 9 7950X3D, 16 physical/32 logical CPUs; both applications use physical CPUs 0–7, controller uses 8–15. Shared host, initially quiet; compiler interference recorded per window.
- OS: Linux 7.3.1-1-cachyos x86_64; GCC 16.2.1.
- Memory: equal 32 GiB application cgroups, including the engine/client and staged native image/software;
memory.swap.max=0. DuckDB internal memory target is 24 GiB. - MO settings: CN SHARED memory cache explicitly 16 GiB; LOCAL/TN caches 512 MiB; disk cache disabled;
GOMAXPROCS=8,GOGC=100,agg_spill_mem=2147483648, UTC/ANSI semantics and result saving off. Configured cache capacity does not establish decoded-column residency. - Storage: default local
DISKfile service with CRC framing. Fresh native images on local NVMe; warm cache is permitted, but physical I/O is measured rather than assumed. - Workload: retained SF10 DBGEN/QGEN inputs, canonical decimal schema/primary keys and Q1–Q22 SQL. Fresh database load once per engine; original Q15 create-view/SELECT/drop-view lifecycle retained.
Details of Performance
Measurement type: separate target-warm profiling replays. The first/cold suite and each CPU target warmup are excluded. Three uninstrumented warm executions per query calibrate sampling duration; they are not a new balanced paired latency benchmark. CPU/counters, native execution plans and selected Go snapshots are separate passes.
Common measurements: whole-application user CPU-clock sampling at 99 Hz with user frame-pointer callchains, grouped user cycles/instructions, cgroup CPU/memory/I/O/swap/OOM and spill events. CPU/instructions are normalized by completed executions. No lost samples; counters ran 100% of enabled time. Native operator timers retain their engine-specific meanings.
Wall-time, CPU and instruction comparison
Wall time is the median of the three already recorded uninstrumented warm executions per query. CPU and instruction costs come from the separate profiled replays. Cold runs are excluded.
| Query | MO wall ms | DuckDB wall ms | Wall ratio | MO CPU s/query | DuckDB CPU s/query | CPU ratio | Instructions ratio |
|---|---|---|---|---|---|---|---|
| Q1 | 1580.774 | 126.484 | 12.50× | 8.0081 | 0.9815 | 8.16× | 9.97× |
| Q2 | 55.718 | 26.379 | 2.11× | 0.2203 | 0.1103 | 2.00× | 1.62× |
| Q3 | 537.103 | 70.124 | 7.66× | 2.1519 | 0.4498 | 4.78× | 2.90× |
| Q4 | 356.937 | 70.174 | 5.09× | 1.5759 | 0.4393 | 3.59× | 2.52× |
| Q5 | 481.318 | 72.211 | 6.67× | 1.8789 | 0.4767 | 3.94× | 2.26× |
| Q6 | 447.042 | 25.234 | 17.72× | 1.2359 | 0.1918 | 6.44× | 3.28× |
| Q7 | 549.973 | 56.996 | 9.65× | 2.0737 | 0.4231 | 4.90× | 2.72× |
| Q8 | 595.328 | 65.719 | 9.06× | 2.2279 | 0.4303 | 5.18× | 2.46× |
| Q9 | 1017.696 | 253.820 | 4.01× | 4.4401 | 1.9220 | 2.31× | 2.64× |
| Q10 | 772.992 | 142.150 | 5.44× | 3.4431 | 0.9581 | 3.59× | 4.32× |
| Q11 | 81.751 | 12.917 | 6.33× | 0.3613 | 0.0676 | 5.35× | 4.49× |
| Q12 | 601.810 | 61.323 | 9.81× | 2.5890 | 0.4293 | 6.03× | 5.36× |
| Q13 | 304.045 | 213.780 | 1.42× | 2.0358 | 1.6176 | 1.26× | 1.55× |
| Q14 | 443.044 | 48.486 | 9.14× | 1.3323 | 0.3338 | 3.99× | 3.26× |
| Q15 | 994.032 | 42.708 | 23.27× | 2.9156 | 0.2789 | 10.45× | 5.87× |
| Q16 | 108.805 | 57.455 | 1.89× | 0.4833 | 0.3257 | 1.48× | 1.98× |
| Q17 | 652.371 | 71.333 | 9.15× | 2.0282 | 0.5113 | 3.97× | 2.55× |
| Q18 | 619.080 | 196.745 | 3.15× | 3.0671 | 1.5310 | 2.00× | 1.28× |
| Q19 | 1013.833 | 90.175 | 11.24× | 4.0688 | 0.6627 | 6.14× | 6.57× |
| Q20 | 590.380 | 53.428 | 11.05× | 2.2261 | 0.3905 | 5.70× | 3.07× |
| Q21 | 1493.921 | 223.378 | 6.69× | 7.1556 | 1.4036 | 5.10× | 4.79× |
| Q22 | 83.013 | 56.900 | 1.46× | 0.5783 | 0.3304 | 1.75× | 3.16× |
| Total | 13380.966 | 2037.918 | 6.57× | 56.0973 | 14.2653 | 3.93× | 3.68× |
Total sums the 22 per-query wall-time medians and normalized CPU/instruction costs. Each total ratio is calculated from the summed MO and DuckDB values, rather than averaging query ratios.
Main findings
- Q1:
lz4block.decodeBlock.abi012.99%;pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill9.92%;pkg/common/hashmap.fillFlatCharStringHashKey8.68%. - Q6:
lz4block.decodeBlock.abi039.82%;pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]18.71%;pkg/objectio.selectExactOrdered[go.shape.uint64,go.shape.int64]8.09%. - Q9:
pkg/container/hashtable.(*Int64HashMap).FindBatch24.64%;lz4block.decodeBlock.abi011.62%;pkg/container/vector.(*Vector).UnionOne7.27%. - Q15:
lz4block.decodeBlock.abi026.69%;pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]16.18%;pkg/sql/colexec/aggexec.(*sumAvgDecExec[go.shape.struct { B0_63 uint64; B64_127 uint64 },go.shape.struct { B0_63 uint64; B64_127 uint64; B128_191 uint64; B192_255 uint64 }]).batchFillSum8.19%. - Q18:
pkg/container/hashtable.(*Int64HashMap).PlanInsertBatch33.30%;pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill11.12%;lz4block.decodeBlock.abi09.97%. - Q21:
pkg/container/hashtable.(*Int64HashMap).FindBatch18.13%;lz4block.decodeBlock.abi011.73%;pkg/sql/colexec/hashjoin.(*container).probe4.59%.
Q1 native plans show generic string-key grouping in MO versus compressed small-domain keys and PERFECT_HASH_GROUP_BY in DuckDB. Both show 59,142,609 rows reaching the main pipeline. The MO tax-adjusted expression still contains DECIMAL256 casts/products; #31034 is already merged. This observation does not by itself prove an incorrect width or authorize narrowing without precision/overflow analysis.
Q15: MO still has two lineitem/revenue producers, while DuckDB materializes one common producer and reads it twice. This is an executed-work difference alongside the measured kernel costs.
Q18 is dominated by group insertion; its instruction gap is smaller than its CPU gap. Lower measured IPC needs additional cache/branch evidence before attribution. Hash probing and scattered gathers remain material in Q9/Q21.
Resource evidence
| Engine | Zero-I/O/spill/swap/OOM/limit/interference CPU windows | Peak application GiB | Reads across capture windows GiB | Writes across capture windows MiB |
|---|---|---|---|---|
| mo | 0/22 | 11.87 | 79.149 | 104.520 |
| duckdb | 21/22 | 9.32 | 0.000 | 7.344 |
Disk-backed is a storage configuration, not a requirement to read physical storage. DuckDB is mostly cache-resident. MO read about 79.15 GiB cumulatively across repeated captures, not per Q1–Q22 suite. Neither engine spilled or used application swap; no OOM/limit events occurred.
Performance acceptance boundary
A completed profile or resource gate does not establish an optimization speedup. Before accepting a proposed fix: freeze clean baseline/candidate identities and settings; demonstrate less named work and faster uninstrumented target queries; run balanced repeated warm comparisons and Q1–Q22 controls; retain uncertainty and reject confirmed regressions. Apply SF100 acceptance where relevant once server129 is available. No optimization subtask is closed by this profiling-only result.
Additional information
Coverage: 44 CPU recordings, 44 native plans and per-query counters/diagrams for this issue. Both new issues together cover 88 CPU recordings and 88 native plans. Selected MO Q1/Q6/Q9/Q15/Q18/Q21 have before/after Go heap and allocation snapshots in each mode. Go samples can lag GC and do not measure native allocators; no exact allocation-byte claim is made.
Profiles: all recordings and analysis are published in the profile release. Files are compressed individually, with direct per-query links below. Profiles/reports total about 20 MB. Full executable/library archives are separate optional downloads, about 152 MB total; they enable independent raw-perf address/source/disassembly analysis. Precomputed tables and diagrams can be read without downloading them.
Detailed findings · Full CPU comparison · Raw analysis · Complete index · Opening instructions · Asset sizes/hashes
Opening raw perf: decompress the needed .elf.zst archives and populate a private cache with perf --buildid-dir "$PWD/symbols" buildid-cache -a FILE.elf; then use that same --buildid-dir with perf report/script. software.json maps exact build IDs. Optimized C++ callchains can remain partial even with matching executables; some stripped libc leaves have no additional symbol information.
Method limits: optimized C++ frame-pointer callchains are shallower than Go callchains. DuckDB known-leaf coverage bottoms near 83.6%, principally stripped-libc leaves in Q13/Q14/Q19. Use common CPU/counters and exclusive leaves for comparison. This local DISK configuration does not cover S3-specific shared-decode dispatch. Historical engine/cache/worker differences prevent attributing an old/new timing change solely to MO optimizations.
Preparation/collection: MO preparation 113.79s including statistics/checkpoint (bulk loads about 39s); DuckDB 58.49s. MO successful CPU/native passes took 133.78s and 142.37s. From local protocol creation to capture completion across both modes/engines: about 19m22s, including setup corrections; completed captures were retained. Offline analysis/diagrams completed about 28s later.
Execution policy: load/query scripts execute and drain only; no input/schema/table/row/result/reference/checksum verification. All local benchmark services stopped and RAM copies were removed. Original inputs and new persistent loaded images remain. server129/SF100 was not profiled.
Per-query profile downloads
mo — Q1–Q22 raw CPU, counters, native plans and CPU-leaf diagrams
| Query | Raw CPU | PMU counters | Native plan | CPU leaf diagram |
|---|---|---|---|---|
| Q1 | perf.data (41.7 KiB) | counters (109 B) | native (654 B) | leaves (11.2 KiB) |
| Q2 | perf.data (34.4 KiB) | counters (111 B) | native (1.6 KiB) | leaves (12.4 KiB) |
| Q3 | perf.data (31.0 KiB) | counters (112 B) | native (1.1 KiB) | leaves (11.3 KiB) |
| Q4 | perf.data (33.2 KiB) | counters (111 B) | native (797 B) | leaves (11.4 KiB) |
| Q5 | perf.data (30.1 KiB) | counters (112 B) | native (1.4 KiB) | leaves (12.0 KiB) |
| Q6 | perf.data (21.4 KiB) | counters (111 B) | native (533 B) | leaves (9.6 KiB) |
| Q7 | perf.data (30.0 KiB) | counters (112 B) | native (1.5 KiB) | leaves (11.8 KiB) |
| Q8 | perf.data (29.5 KiB) | counters (111 B) | native (1.7 KiB) | leaves (12.2 KiB) |
| Q9 | perf.data (33.3 KiB) | counters (111 B) | native (1.4 KiB) | leaves (12.1 KiB) |
| Q10 | perf.data (38.3 KiB) | counters (111 B) | native (1.2 KiB) | leaves (13.4 KiB) |
| Q11 | perf.data (35.6 KiB) | counters (110 B) | native (1.2 KiB) | leaves (11.8 KiB) |
| Q12 | perf.data (32.5 KiB) | counters (111 B) | native (875 B) | leaves (11.2 KiB) |
| Q13 | perf.data (45.8 KiB) | counters (111 B) | native (843 B) | leaves (10.8 KiB) |
| Q14 | perf.data (26.1 KiB) | counters (111 B) | native (788 B) | leaves (11.8 KiB) |
| Q15 | perf.data (27.5 KiB) | counters (111 B) | native (955 B) | leaves (12.2 KiB) |
| Q16 | perf.data (37.1 KiB) | counters (111 B) | native (1.1 KiB) | leaves (11.7 KiB) |
| Q17 | perf.data (27.8 KiB) | counters (108 B) | native (1.1 KiB) | leaves (11.5 KiB) |
| Q18 | perf.data (35.8 KiB) | counters (110 B) | native (1.1 KiB) | leaves (11.5 KiB) |
| Q19 | perf.data (31.4 KiB) | counters (111 B) | native (1.0 KiB) | leaves (10.4 KiB) |
| Q20 | perf.data (28.8 KiB) | counters (111 B) | native (1.4 KiB) | leaves (10.8 KiB) |
| Q21 | perf.data (40.1 KiB) | counters (111 B) | native (1.4 KiB) | leaves (13.1 KiB) |
| Q22 | perf.data (50.7 KiB) | counters (111 B) | native (1.1 KiB) | leaves (12.2 KiB) |
duckdb — Q1–Q22 raw CPU, counters, native plans and CPU-leaf diagrams
| Query | Raw CPU | PMU counters | Native plan | CPU leaf diagram |
|---|---|---|---|---|
| Q1 | perf.data (51.9 KiB) | counters (111 B) | native (2.5 KiB) | leaves (10.0 KiB) |
| Q2 | perf.data (32.5 KiB) | counters (112 B) | native (4.4 KiB) | leaves (14.4 KiB) |
| Q3 | perf.data (44.0 KiB) | counters (111 B) | native (2.9 KiB) | leaves (14.2 KiB) |
| Q4 | perf.data (42.4 KiB) | counters (111 B) | native (3.2 KiB) | leaves (13.4 KiB) |
| Q5 | perf.data (44.3 KiB) | counters (111 B) | native (3.5 KiB) | leaves (13.6 KiB) |
| Q6 | perf.data (46.0 KiB) | counters (112 B) | native (1.5 KiB) | leaves (11.1 KiB) |
| Q7 | perf.data (49.4 KiB) | counters (111 B) | native (4.5 KiB) | leaves (14.7 KiB) |
| Q8 | perf.data (44.6 KiB) | counters (111 B) | native (4.3 KiB) | leaves (13.2 KiB) |
| Q9 | perf.data (44.4 KiB) | counters (112 B) | native (4.1 KiB) | leaves (13.7 KiB) |
| Q10 | perf.data (45.1 KiB) | counters (111 B) | native (3.7 KiB) | leaves (14.8 KiB) |
| Q11 | perf.data (37.0 KiB) | counters (111 B) | native (3.5 KiB) | leaves (15.4 KiB) |
| Q12 | perf.data (45.8 KiB) | counters (110 B) | native (3.1 KiB) | leaves (13.5 KiB) |
| Q13 | perf.data (43.8 KiB) | counters (112 B) | native (2.2 KiB) | leaves (11.0 KiB) |
| Q14 | perf.data (46.8 KiB) | counters (111 B) | native (1.9 KiB) | leaves (13.6 KiB) |
| Q15 | perf.data (44.7 KiB) | counters (111 B) | native (3.3 KiB) | leaves (13.6 KiB) |
| Q16 | perf.data (40.1 KiB) | counters (111 B) | native (3.6 KiB) | leaves (15.3 KiB) |
| Q17 | perf.data (46.8 KiB) | counters (111 B) | native (3.1 KiB) | leaves (12.3 KiB) |
| Q18 | perf.data (49.2 KiB) | counters (110 B) | native (4.1 KiB) | leaves (12.6 KiB) |
| Q19 | perf.data (46.4 KiB) | counters (111 B) | native (2.5 KiB) | leaves (13.7 KiB) |
| Q20 | perf.data (50.4 KiB) | counters (112 B) | native (3.7 KiB) | leaves (14.6 KiB) |
| Q21 | perf.data (42.2 KiB) | counters (109 B) | native (4.4 KiB) | leaves (13.8 KiB) |
| Q22 | perf.data (34.8 KiB) | counters (111 B) | native (3.6 KiB) | leaves (11.7 KiB) |
Selected MO Go heap/allocation snapshots
Sampled Go counters can lag GC and do not include native allocators; these are diagnostic snapshots, not exact query-allocation totals.
| Query | Before allocs | After allocs | Before heap | After heap |
|---|---|---|---|---|
| Q1 | before allocs (322.4 KiB) | after allocs (323.9 KiB) | before heap (323.4 KiB) | after heap (324.5 KiB) |
| Q6 | before allocs (324.8 KiB) | after allocs (325.3 KiB) | before heap (325.1 KiB) | after heap (325.2 KiB) |
| Q9 | before allocs (325.4 KiB) | after allocs (325.4 KiB) | before heap (325.5 KiB) | after heap (325.7 KiB) |
| Q15 | before allocs (325.7 KiB) | after allocs (324.8 KiB) | before heap (325.7 KiB) | after heap (325.0 KiB) |
| Q18 | before allocs (325.4 KiB) | after allocs (326.1 KiB) | before heap (325.3 KiB) | after heap (326.0 KiB) |
| Q21 | before allocs (326.2 KiB) | after allocs (325.9 KiB) | before heap (325.9 KiB) | after heap (326.0 KiB) |
Optional full executable/library archives — download only what your analysis needs
| Executable/library | Download | Compressed size |
|---|---|---|
| libc.so.6 | exact ELF | 1.01 MiB |
| libgcc_s.so.1 | exact ELF | 95.8 KiB |
| mo-service | exact ELF | 108.63 MiB |
| tpch-profile-session | exact ELF | 23.86 MiB |
| libresolv.so.2 | exact ELF | 31.9 KiB |
| ld-linux-x86-64.so.2 | exact ELF | 145.5 KiB |
| libstdc++.so.6 | exact ELF | 1.05 MiB |
| onnxruntime.so | exact ELF | 7.21 MiB |
| libmo.so | exact ELF | 898.1 KiB |
| libusearch_c.so | exact ELF | 820.2 KiB |
| libm.so.6 | exact ELF | 536.6 KiB |
| libmvec.so.1 | exact ELF | 273.2 KiB |
| libgomp.so.1 | exact ELF | 199.6 KiB |

Activity
aunjgr commentedon Nov 3, 2026
mo — Q1–Q22 analyzed CPU profiles (disk)
Exclusive user-CPU leaves, weighted by sample periods and normalized per completed query. Symbols below are abbreviated for readability. Raw recordings, counters, native plans, leaf diagrams and optional full executable/library archives are linked directly from the issue body. Full profile release.
Q1 — 8.0081 application CPU s/query; 151.24 billion instructions/query; 100.00% known leaves
lz4block.decodeBlock.abi0pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFillpkg/common/hashmap.fillFlatCharStringHashKeypkg/common/hashmap.(*strHashmapIterator).prepareHashKeyspkg/sql/colexec/aggexec.(*sumAvgDecExec[go.shape.struct { B0_63 uint64; B64_127 uint64 },go.shape.struct { B0_63 uint64; B64_127 uint64; B128_191 uint64; B192_255 uint64 }]).batchFillSumruntime.memmovepkg/sql/colexec/aggexec.(*sumAvgDecExec[go.shape.struct { B0_63 uint64; B64_127 uint64; B128_191 uint64; B192_255 uint64 },go.shape.struct { B0_63 uint64; B64_127 uint64; B128_191 uint64; B192_255 uint64 }]).batchFillSumpkg/sql/plan/function.d128MulQ2 — 0.2203 application CPU s/query; 2.67 billion instructions/query; 99.52% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchruntime.memmovepkg/common/hashmap.fillKeys[go.shape.uint32]pkg/container/vector.(*Vector).unionBatchContiguousVarlenRangepkg/sql/colexec/hashjoin.(*container).appendMembershipMatchespkg/common/hashmap.(*intHashMapIterator).Findpkg/sql/colexec/hashjoin.(*container).appendUniqueMatchespkg/container/hashtable.crc32Int64BatchHash.abi0Q3 — 2.1519 application CPU s/query; 19.51 billion instructions/query; 99.72% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchlz4block.decodeBlock.abi0pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]pkg/container/vector.unionT[go.shape.int64]pkg/sql/colexec/hashjoin.(*container).appendUniqueMatchesruntime.memmovepkg/sql/colexec/shuffle.(*Shuffle).routeSingleBucketpkg/container/hashtable.(*Int64HashMap).InsertBatchWithRingQ4 — 1.5759 application CPU s/query; 16.76 billion instructions/query; 99.82% known leaves
lz4block.decodeBlock.abi0pkg/sql/colexec/table_scan.(*TableScan).evalFilterpkg/container/hashtable.(*Int64HashMap).FindBatchpkg/container/vector.(*FunctionParameterWithoutNull[pkg/container/types.Date]).GetValuepkg/sql/colexec/hashjoin.(*container).probepkg/sql/plan/function.opBinaryFixedFixedToFixed[go.shape.int32,go.shape.int32,go.shape.bool]runtime.memmovepkg/container/vector.shrinkFixed[go.shape.int32]Q5 — 1.8789 application CPU s/query; 16.88 billion instructions/query; 99.93% known leaves
lz4block.decodeBlock.abi0pkg/container/hashtable.(*Int64HashMap).FindBatchruntime.memmovepkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]pkg/sql/colexec/hashjoin.(*container).appendUniqueMatchespkg/container/vector.unionT[go.shape.int64]pkg/common/hashmap.(*intHashMapIterator).Findinternal/runtime/syscall/linux.Syscall6Q6 — 1.2359 application CPU s/query; 11.33 billion instructions/query; 100.00% known leaves
lz4block.decodeBlock.abi0pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]pkg/objectio.selectExactOrdered[go.shape.uint64,go.shape.int64]context.valueinternal/runtime/syscall/linux.Syscall6__vdso_clock_gettimeruntime.mapaccess2runtime.memclrNoHeapPointersQ7 — 2.0737 application CPU s/query; 17.09 billion instructions/query; 100.00% known leaves
lz4block.decodeBlock.abi0pkg/container/hashtable.(*Int64HashMap).FindBatchruntime.memmovepkg/sql/plan/function.opBetweenFixed[go.shape.int32]pkg/sql/colexec/hashjoin.(*container).appendUniqueMatchespkg/sql/colexec/table_scan.(*TableScan).evalFilterpkg/common/hashmap.fillKeys[go.shape.uint32]internal/runtime/syscall/linux.Syscall6Q8 — 2.2279 application CPU s/query; 18.41 billion instructions/query; 99.92% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchlz4block.decodeBlock.abi0runtime.memmovepkg/common/hashmap.fillKeys[go.shape.uint32]pkg/sql/colexec/hashjoin.(*container).appendUniqueMatchespkg/sql/colexec/table_scan.(*TableScan).evalFiltercontext.valuepkg/sql/plan/function.opBetweenFixed[go.shape.int32]Q9 — 4.4401 application CPU s/query; 43.25 billion instructions/query; 99.67% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchlz4block.decodeBlock.abi0pkg/container/vector.(*Vector).UnionOnepkg/container/vector.BuildVarlenaFromVarlenaruntime.memmovepkg/sql/colexec/hashjoin.(*container).probepkg/sql/colexec/hashjoin.(*container).appendUniqueMatchespkg/common/hashmap.fillKeys[go.shape.uint32]Q10 — 3.4431 application CPU s/query; 41.92 billion instructions/query; 99.89% known leaves
lz4block.decodeBlock.abi0pkg/container/types.CompareStringValuesruntime.memmovepkg/container/hashtable.(*Int64HashMap).FindBatchcmpbodypkg/sql/plan/function.equalFn.func20pkg/sql/colexec/table_scan.(*TableScan).evalFilterpkg/container/vector.(*Vector).UnionOneQ11 — 0.3613 application CPU s/query; 4.30 billion instructions/query; 99.82% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchruntime.memmovepkg/common/hashmap.fillKeys[go.shape.uint32]pkg/sql/colexec/hashjoin.(*container).appendUniqueMatchespkg/common/hashmap.(*intHashMapIterator).Findpkg/container/vector.(*Vector).IsConstNullpkg/container/vector.(*Vector).UnionMultipkg/container/hashtable.crc32Int64BatchHash.abi0Q12 — 2.5890 application CPU s/query; 31.14 billion instructions/query; 100.00% known leaves
lz4block.decodeBlock.abi0pkg/sql/colexec/table_scan.(*TableScan).evalFilterpkg/container/vector.(*FunctionParameterWithoutNull[pkg/container/types.Date]).GetValueruntime.memmovepkg/container/hashtable.(*Int64HashMap).FindBatchpkg/container/vector.validateVectorBinarypkg/container/vector.(*Vector).unionBatchContiguousVarlenRangepkg/container/vector.validateJSONPayloadQ13 — 2.0358 application CPU s/query; 24.38 billion instructions/query; 99.51% known leaves
pkg/container/hashtable.(*Int64HashMap).PlanInsertBatchpkg/sql/colexec/aggexec.(*countColumnExec).BatchFillpkg/container/vector.(*Vector).UnionOnepkg/container/hashtable.(*Int64HashMap).FindBatchindexbodypkg/sql/colexec/shuffle.getShuffledSelsByRangeWithoutNullindexbytebodypkg/sql/colexec/hashjoin.(*container).appendUniqueMatchesQ14 — 1.3323 application CPU s/query; 13.50 billion instructions/query; 99.69% known leaves
lz4block.decodeBlock.abi0pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]pkg/container/vector.(*Vector).UnionOnepkg/sql/colexec/hashjoin.(*container).probeinternal/runtime/syscall/linux.Syscall6runtime.memmovepkg/container/nulls.(*Nulls).materializeValiditycontext.valueQ15 — 2.9156 application CPU s/query; 23.61 billion instructions/query; 100.00% known leaves
lz4block.decodeBlock.abi0pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]pkg/sql/colexec/aggexec.(*sumAvgDecExec[go.shape.struct { B0_63 uint64; B64_127 uint64 },go.shape.struct { B0_63 uint64; B64_127 uint64; B128_191 uint64; B192_255 uint64 }]).batchFillSumpkg/container/hashtable.(*Int64HashMap).PlanInsertBatchinternal/runtime/syscall/linux.Syscall6runtime.memclrNoHeapPointerspkg/sql/colexec/aggexec.(*sumAvgDecExec[go.shape.struct { B0_63 uint64; B64_127 uint64 },go.shape.struct { B0_63 uint64; B64_127 uint64; B128_191 uint64; B192_255 uint64 }]).BatchMergecontext.valueQ16 — 0.4833 application CPU s/query; 6.50 billion instructions/query; 99.11% known leaves
pkg/container/hashtable.(*StringHashMap).PlanInsertStringBatchpkg/container/hashtable.(*Int64HashMap).FindBatchruntime.memmovepkg/container/hashtable.(*StringHashMap).rehashInPlacepkg/sql/colexec/aggexec.(*countColumnExec).BatchFillpkg/common/hashmap.(*strHashmapIterator).prepareHashKeyspkg/container/vector.unionT[go.shape.int64]runtime.memclrNoHeapPointersQ17 — 2.0282 application CPU s/query; 21.10 billion instructions/query; 100.00% known leaves
runtime.mapaccess2_fast32lz4block.decodeBlock.abi0pkg/sql/plan/function.(*opOperatorIntegerIn[go.shape.int32]).evalruntime.memmoveinternal/runtime/syscall/linux.Syscall6pkg/sql/colexec/table_scan.(*TableScan).evalFilter__vdso_clock_gettimeruntime.stepQ18 — 3.0671 application CPU s/query; 25.16 billion instructions/query; 99.67% known leaves
pkg/container/hashtable.(*Int64HashMap).PlanInsertBatchpkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFilllz4block.decodeBlock.abi0pkg/container/vector.(*Vector).unionBatchpkg/sql/colexec/group.(*container).preflightBuildChunkpkg/container/hashtable.(*Int64HashMap).CommitInsertBatchPlanpkg/container/hashtable.(*Int64HashMap).rehashInPlaceruntime.memclrNoHeapPointersQ19 — 4.0688 application CPU s/query; 52.66 billion instructions/query; 100.00% known leaves
lz4block.decodeBlock.abi0runtime.memmovepkg/container/types.CompareStringValuespkg/container/vector.validateVectorBinarycmpbodypkg/container/vector.validateJSONPayloadpkg/sql/colexec/table_scan.(*TableScan).evalFilterpkg/sql/plan/function.equalFn.func20Q20 — 2.2261 application CPU s/query; 17.95 billion instructions/query; 99.35% known leaves
pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFillpkg/container/hashtable.(*Int64HashMap).PlanInsertBatchpkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32]lz4block.decodeBlock.abi0pkg/container/hashtable.(*Int64HashMap).rehashInPlacepkg/container/vector.(*Vector).unionBatchpkg/container/hashtable.(*Int64HashMap).FindBatchpkg/common/hashmap.fillKeys[go.shape.uint32]Q21 — 7.1556 application CPU s/query; 83.95 billion instructions/query; 99.89% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchlz4block.decodeBlock.abi0pkg/sql/colexec/hashjoin.(*container).probepkg/sql/colexec/table_scan.(*TableScan).evalFilterpkg/container/vector.(*FunctionParameterWithoutNull[pkg/container/types.Date]).GetValuepkg/container/vector.(*Vector).IsConstNullruntime.memmovepkg/container/nulls.(*Nulls).ContainsQ22 — 0.5783 application CPU s/query; 9.12 billion instructions/query; 99.27% known leaves
pkg/container/hashtable.(*Int64HashMap).FindBatchpkg/sql/colexec/hashjoin.(*container).probepkg/container/vector.appendOneBytesWithSourcepkg/sql/colexec/shuffle.getShuffledSelsByRangeWithoutNullpkg/container/vector.(*Vector).UnionMultipkg/common/hashmap.fillKeys[go.shape.uint32]internal/runtime/maps.(*Map).getWithoutKeySmallFastStrruntime.memmoveaunjgr commentedon Nov 3, 2026
duckdb — Q1–Q22 analyzed CPU profiles (disk)
Exclusive user-CPU leaves, weighted by sample periods and normalized per completed query. Symbols below are abbreviated for readability. Raw recordings, counters, native plans, leaf diagrams and optional full executable/library archives are linked directly from the issue body. Full profile release.
Q1 — 0.9815 application CPU s/query; 15.16 billion instructions/query; 99.29% known leaves
void duckdb::AggregateFunction::UnaryScatterUpdate<duckdb::(anonymous namespace)::AvgState<duckdb::hugeint_t>, long, duckdb::(anonymous namespace)::IntegerAverageOperationHugeint>(duckdb::Vector*, duckdb::AggregateInp…void duckdb::AggregateFunction::UnaryScatterUpdate<duckdb::SumState<long>, long, duckdb::(anonymous namespace)::IntegerSumOperation>(duckdb::Vector*, duckdb::AggregateInputData&, unsigned long, duckdb::Vector&, unsign…duckdb::PerfectAggregateHashTable::AddChunk(duckdb::DataChunk&, duckdb::DataChunk&)void duckdb::ScalarFunction::BinaryFunction<long, long, long, duckdb::MultiplyOperator>(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)duckdb::VectorOperations::AddInPlace(duckdb::Vector&, long, unsigned long)duckdb::SelectionVector::Slice(duckdb::SelectionVector const&, unsigned long) constvoid duckdb::AggregateFunction::NullaryScatterUpdate<long, duckdb::(anonymous namespace)::CountStarFunction>(duckdb::Vector*, duckdb::AggregateInputData&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)Q2 — 0.1103 application CPU s/query; 1.65 billion instructions/query; 97.00% known leaves
duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constint duckdb::DeltaDecode<int>(int*, int, unsigned long) [clone .isra.0]void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned long*)[unknown]duckdb_fsst_decompressQ3 — 0.4498 application CPU s/query; 6.72 billion instructions/query; 98.37% known leaves
duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constduckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool)duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)Q4 — 0.4393 application CPU s/query; 6.64 billion instructions/query; 98.73% known leaves
duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constduckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool)Q5 — 0.4767 application CPU s/query; 7.47 billion instructions/query; 99.46% known leaves
duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constduckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)duckdb_fastpforlib::internal::__fastunpack5(unsigned int const*, unsigned long*)Q6 — 0.1918 application CPU s/query; 3.46 billion instructions/query; 99.87% known leaves
void duckdb::FilterSelectionSwitch<long>(duckdb::UnifiedVectorFormat&, long, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)duckdb_fastpforlib::internal::__fastunpack13(unsigned int const*, unsigned long*)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack4(unsigned int const*, unsigned long*)duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*)Q7 — 0.4231 application CPU s/query; 6.29 billion instructions/query; 98.97% known leaves
void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constvoid duckdb::PerfectHashJoinExecutor::TemplatedFillSelectionVectorProbe<int>(duckdb::Vector&, duckdb::SelectionVector&, duckdb::SelectionVector&, unsigned long, unsigned long&)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned int*)Q8 — 0.4303 application CPU s/query; 7.50 billion instructions/query; 98.83% known leaves
duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constduckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*)duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned int*)Q9 — 1.9220 application CPU s/query; 16.39 billion instructions/query; 96.81% known leaves
duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool)duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constduckdb::JoinHashTable::Finalize(unsigned long, unsigned long, bool)duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::PartitionedTupleData::BuildPartitionSel<true>(duckdb::PartitionedTupleDataAppendState&, duckdb::SelectionVector const&, unsigned long, unsigned long)[unknown]duckdb::InitializeValidityMask(unsigned char* const*, unsigned long, unsigned long)Q10 — 0.9581 application CPU s/query; 9.69 billion instructions/query; 94.87% known leaves
duckdb::ColumnSegment::FilterSelection(duckdb::SelectionVector&, duckdb::Vector&, duckdb::UnifiedVectorFormat&, duckdb::TableFilter const&, duckdb::TableFilterState&, unsigned long, unsigned long&)duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…[unknown]duckdb_fsst_decompressvoid duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb::FastMemcpy(void*, void const*, unsigned long)void duckdb::UnaryExecutor::ExecuteFlat<duckdb::uhugeint_t, duckdb::string_t, duckdb::UnaryLambdaWrapper, duckdb::(anonymous namespace)::StringDecompressFunction<duckdb::uhugeint_t>(duckdb::DataChunk&, duckdb::Express…duckdb::StringHeap::AddBlob(char const*, unsigned long)Q11 — 0.0676 application CPU s/query; 0.96 billion instructions/query; 98.35% known leaves
void duckdb::PerfectHashJoinExecutor::TemplatedFillSelectionVectorProbe<int>(duckdb::Vector&, duckdb::SelectionVector&, duckdb::SelectionVector&, unsigned long, unsigned long&)void duckdb::AggregateFunction::StateInitialize<duckdb::SumState<duckdb::hugeint_t>, duckdb::(anonymous namespace)::SumToHugeintOperation, (duckdb::AggregateDestructorType)0>(duckdb::AggregateFunction const&, unsigned…duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long)int duckdb::DeltaDecode<int>(int*, int, unsigned long) [clone .isra.0]duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned long*)duckdb::hugeint_t::operator*(duckdb::hugeint_t const&) constQ12 — 0.4293 application CPU s/query; 5.81 billion instructions/query; 99.49% known leaves
duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)unsigned long duckdb::BinaryExecutor::SelectGeneric<int, int, duckdb::GreaterThan>(duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb::SelectionVector*)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]duckdb_fastpforlib::internal::__fastunpack3(unsigned int const*, unsigned int*)duckdb_fastpforlib::internal::__fastunpack5(unsigned int const*, unsigned long*)Q13 — 1.6176 application CPU s/query; 15.73 billion instructions/query; 83.53% known leaves
[unknown]duckdb_fsst_decompressduckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&)duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::FindStrInStr(unsigned char const*, unsigned long, unsigned char const*, unsigned long)duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::PartitionedTupleData::BuildPartitionSel<true>(duckdb::PartitionedTupleDataAppendState&, duckdb::SelectionVector const&, unsigned long, unsigned long)Q14 — 0.3338 application CPU s/query; 4.14 billion instructions/query; 92.40% known leaves
void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)[unknown]duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*)duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::TupleDataTemplatedScatter<duckdb::string_t>(duckdb::Vector const&, duckdb::TupleDataVectorFormat const&, duckdb::SelectionVector const&, unsigned long, duckdb::TupleDataLayout const&, duckdb::Vector const…Q15 — 0.2789 application CPU s/query; 4.02 billion instructions/query; 98.55% known leaves
void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&)duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*)duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned int*)Q16 — 0.3257 application CPU s/query; 3.28 billion instructions/query; 96.33% known leaves
duckdb::FastMemcpy(void*, void const*, unsigned long)duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&)duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const[unknown]duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)unsigned long duckdb::Hash<duckdb::string_t>(duckdb::string_t)Q17 — 0.5113 application CPU s/query; 8.27 billion instructions/query; 99.58% known leaves
duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constduckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack13(unsigned int const*, unsigned long*)duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*)Q18 — 1.5310 application CPU s/query; 19.67 billion instructions/query; 98.82% known leaves
duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&)void duckdb::PartitionedTupleData::BuildPartitionSel<true>(duckdb::PartitionedTupleDataAppendState&, duckdb::SelectionVector const&, unsigned long, unsigned long)duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::TupleDataTemplatedGather<unsigned long>(duckdb::TupleDataLayout const&, duckdb::Vector&, unsigned long, duckdb::SelectionVector const&, unsigned long, duckdb::Vector&, duckdb::SelectionVector const&, duck…duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::FastMemcpy(void*, void const*, unsigned long)void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)Q19 — 0.6627 application CPU s/query; 8.02 billion instructions/query; 90.41% known leaves
duckdb::ColumnSegment::FilterSelection(duckdb::SelectionVector&, duckdb::Vector&, duckdb::UnifiedVectorFormat&, duckdb::TableFilter const&, duckdb::TableFilterState&, unsigned long, unsigned long&)[unknown]unsigned long duckdb::BinaryExecutor::SelectGeneric<duckdb::string_t, duckdb::string_t, duckdb::Equals>(duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb…duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool)duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack3(unsigned int const*, unsigned int*)duckdb::SelectionVector::Slice(duckdb::SelectionVector const&, unsigned long) constQ20 — 0.3905 application CPU s/query; 5.85 billion instructions/query; 99.37% known leaves
duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*)duckdb_fastpforlib::internal::__fastunpack13(unsigned int const*, unsigned long*)duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) constQ21 — 1.4036 application CPU s/query; 17.51 billion instructions/query; 99.02% known leaves
duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)unsigned long duckdb::BinaryExecutor::SelectFlat<int, int, duckdb::GreaterThan, false, false>(duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb::Selectio…void duckdb::PerfectHashJoinExecutor::TemplatedFillSelectionVectorProbe<int>(duckdb::Vector&, duckdb::SelectionVector&, duckdb::SelectionVector&, unsigned long, unsigned long&)long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0]duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool)duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*)Q22 — 0.3304 application CPU s/query; 2.89 billion instructions/query; 99.08% known leaves
duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel…duckdb::VectorOperations::Equals(duckdb::Vector&, duckdb::Vector&, duckdb::Vector&, unsigned long)void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long)duckdb::StringVector::EmptyString(duckdb::Vector&, unsigned long)duckdb::SubstringASCII(duckdb::Vector&, duckdb::string_t, long, long)duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long)duckdb_fsst_decompressduckdb::ExpressionExecutor::DefaultSelect(duckdb::Expression const&, duckdb::ExpressionState*, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb::SelectionVector*)aunjgr commentedon Nov 3, 2026
New-profile cache explanation and optimization directions
The full source-backed investigation is posted with the all-memory profiles. Its most important disk-backed finding is that the normal-admission change #31767 was intentionally reverted by #31943, following the reported 25.7% 1T regression in #31868.
The profiled main again applies the reader cutoff:
GetThresholdForReader(8)=128; after the threshold, the reader setsSkipMemoryCacheWrites, and the memory-cache update returns without admission. Saved startup logs confirm CN SHARED initialized at 16 GiB. Capacity was configured correctly; late-scan admission is nevertheless suppressed. No exact current occupancy is claimed without the missing occupancy counters.The disk-backed profiles read 79.15 GiB across repeated capture windows; all-memory profiles read zero. The summed per-query wall times are 13.381s versus 6.680s for MO across the two storage modes. These are observations, not an isolated cache-policy speedup. LocalFS also discards read file ranges before knowing whether a later cache update retains them.
The proposed direction is bounded reuse-aware admission plus a separately bounded encoded-page retention policy, using the existing cache/physical reservations and preserving explicit caller suppression. Do not simply reapply the reverted change or globally disable DONTNEED: #30848 already records a Q1 pressure/reclaim counterexample, and the 1T negative case remains a required control for #30849.
Other concrete candidates in the report include hoisting JSON-only checks from non-JSON vectors, batch specialization of constant CHAR comparisons, low-cardinality group/state addressing, safe partial scan prefilters with owned varlen outputs, shuffle-aware runtime filters, ordered join gathers, exact-IN fallback outside bitmap limits, and restricting Q20 candidates before aggregation.
This investigation used existing profiles and current source only. No new benchmark/profile, kernel implementation or server129 job was run; no issue was closed or reopened.
aunjgr commentedon Nov 15, 2026
Closing this completed measurement/reporting issue at the requester's direction.
The 2026-11-03 local SF10 disk-backed main-versus-DuckDB profiling round is complete. Its full results, per-query analyzed/raw profiles and exact software archives are published.
The recorded source pins, results, downloads, methodology corrections and uncertainty remain the evidence for that historical round. Completion of this report does not certify current-main performance or close the optimization backlog. Remaining engine optimization work is tracked in #30838 and its subtasks; dictionary execution work remains in #32379.