Skip to content

[Performance]: TPC-H SF10 current-main disk-backed warm profiling — MO vs DuckDB (2026-11-03) #32072

Closed

Description

@aunjgr

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 DISK file 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.abi0 12.99%; pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill 9.92%; pkg/common/hashmap.fillFlatCharStringHashKey 8.68%.
  • Q6: lz4block.decodeBlock.abi0 39.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).FindBatch 24.64%; lz4block.decodeBlock.abi0 11.62%; pkg/container/vector.(*Vector).UnionOne 7.27%.
  • Q15: lz4block.decodeBlock.abi0 26.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 }]).batchFillSum 8.19%.
  • Q18: pkg/container/hashtable.(*Int64HashMap).PlanInsertBatch 33.30%; pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill 11.12%; lz4block.decodeBlock.abi0 9.97%.
  • Q21: pkg/container/hashtable.(*Int64HashMap).FindBatch 18.13%; lz4block.decodeBlock.abi0 11.73%; pkg/sql/colexec/hashjoin.(*container).probe 4.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

SF10 CPU costs

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

  1. self-assigned this
    on Nov 3, 2026
  2. aunjgr commented on Nov 3, 2026

    @aunjgr
    ContributorAuthor

    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
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 12.99%
    pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill 9.92%
    pkg/common/hashmap.fillFlatCharStringHashKey 8.68%
    pkg/common/hashmap.(*strHashmapIterator).prepareHashKeys 6.24%
    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 }]).batchFillSum 3.95%
    runtime.memmove 3.67%
    pkg/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 }]).batchFillSum 3.03%
    pkg/sql/plan/function.d128Mul 2.66%
    Q2 — 0.2203 application CPU s/query; 2.67 billion instructions/query; 99.52% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 26.24%
    runtime.memmove 8.97%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 8.50%
    pkg/container/vector.(*Vector).unionBatchContiguousVarlenRange 4.62%
    pkg/sql/colexec/hashjoin.(*container).appendMembershipMatches 3.20%
    pkg/common/hashmap.(*intHashMapIterator).Find 3.20%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 2.72%
    pkg/container/hashtable.crc32Int64BatchHash.abi0 2.52%
    Q3 — 2.1519 application CPU s/query; 19.51 billion instructions/query; 99.72% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 25.35%
    lz4block.decodeBlock.abi0 24.16%
    pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32] 10.45%
    pkg/container/vector.unionT[go.shape.int64] 6.48%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 2.16%
    runtime.memmove 1.88%
    pkg/sql/colexec/shuffle.(*Shuffle).routeSingleBucket 1.53%
    pkg/container/hashtable.(*Int64HashMap).InsertBatchWithRing 1.39%
    Q4 — 1.5759 application CPU s/query; 16.76 billion instructions/query; 99.82% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 22.41%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 12.09%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 11.72%
    pkg/container/vector.(*FunctionParameterWithoutNull[pkg/container/types.Date]).GetValue 9.45%
    pkg/sql/colexec/hashjoin.(*container).probe 6.57%
    pkg/sql/plan/function.opBinaryFixedFixedToFixed[go.shape.int32,go.shape.int32,go.shape.bool] 4.05%
    runtime.memmove 3.93%
    pkg/container/vector.shrinkFixed[go.shape.int32] 2.09%
    Q5 — 1.8789 application CPU s/query; 16.88 billion instructions/query; 99.93% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 24.87%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 20.52%
    runtime.memmove 5.69%
    pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32] 4.87%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 3.90%
    pkg/container/vector.unionT[go.shape.int64] 3.30%
    pkg/common/hashmap.(*intHashMapIterator).Find 1.72%
    internal/runtime/syscall/linux.Syscall6 1.20%
    Q6 — 1.2359 application CPU s/query; 11.33 billion instructions/query; 100.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 39.82%
    pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32] 18.71%
    pkg/objectio.selectExactOrdered[go.shape.uint64,go.shape.int64] 8.09%
    context.value 2.02%
    internal/runtime/syscall/linux.Syscall6 1.14%
    __vdso_clock_gettime 1.14%
    runtime.mapaccess2 1.01%
    runtime.memclrNoHeapPointers 1.01%
    Q7 — 2.0737 application CPU s/query; 17.09 billion instructions/query; 100.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 26.69%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 16.88%
    runtime.memmove 5.63%
    pkg/sql/plan/function.opBetweenFixed[go.shape.int32] 4.71%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 3.42%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 3.35%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 2.89%
    internal/runtime/syscall/linux.Syscall6 1.83%
    Q8 — 2.2279 application CPU s/query; 18.41 billion instructions/query; 99.92% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 26.01%
    lz4block.decodeBlock.abi0 20.44%
    runtime.memmove 5.82%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 4.68%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 2.67%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 1.94%
    context.value 1.78%
    pkg/sql/plan/function.opBetweenFixed[go.shape.int32] 1.62%
    Q9 — 4.4401 application CPU s/query; 43.25 billion instructions/query; 99.67% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 24.64%
    lz4block.decodeBlock.abi0 11.62%
    pkg/container/vector.(*Vector).UnionOne 7.27%
    pkg/container/vector.BuildVarlenaFromVarlena 6.34%
    runtime.memmove 4.69%
    pkg/sql/colexec/hashjoin.(*container).probe 4.56%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 3.50%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 2.91%
    Q10 — 3.4431 application CPU s/query; 41.92 billion instructions/query; 99.89% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 20.83%
    pkg/container/types.CompareStringValues 5.67%
    runtime.memmove 5.23%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 4.85%
    cmpbody 3.69%
    pkg/sql/plan/function.equalFn.func20 2.75%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 2.75%
    pkg/container/vector.(*Vector).UnionOne 2.53%
    Q11 — 0.3613 application CPU s/query; 4.30 billion instructions/query; 99.82% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 35.23%
    runtime.memmove 4.55%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 4.49%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 4.25%
    pkg/common/hashmap.(*intHashMapIterator).Find 2.58%
    pkg/container/vector.(*Vector).IsConstNull 2.22%
    pkg/container/vector.(*Vector).UnionMulti 2.16%
    pkg/container/hashtable.crc32Int64BatchHash.abi0 1.68%
    Q12 — 2.5890 application CPU s/query; 31.14 billion instructions/query; 100.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 23.02%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 9.77%
    pkg/container/vector.(*FunctionParameterWithoutNull[pkg/container/types.Date]).GetValue 9.26%
    runtime.memmove 6.17%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 3.60%
    pkg/container/vector.validateVectorBinary 3.54%
    pkg/container/vector.(*Vector).unionBatchContiguousVarlenRange 3.54%
    pkg/container/vector.validateJSONPayload 2.89%
    Q13 — 2.0358 application CPU s/query; 24.38 billion instructions/query; 99.51% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).PlanInsertBatch 9.82%
    pkg/sql/colexec/aggexec.(*countColumnExec).BatchFill 9.71%
    pkg/container/vector.(*Vector).UnionOne 9.67%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 8.92%
    indexbody 5.10%
    pkg/sql/colexec/shuffle.getShuffledSelsByRangeWithoutNull 4.57%
    indexbytebody 4.42%
    pkg/sql/colexec/hashjoin.(*container).appendUniqueMatches 4.35%
    Q14 — 1.3323 application CPU s/query; 13.50 billion instructions/query; 99.69% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 27.20%
    pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32] 16.03%
    pkg/container/vector.(*Vector).UnionOne 4.65%
    pkg/sql/colexec/hashjoin.(*container).probe 2.90%
    internal/runtime/syscall/linux.Syscall6 1.86%
    runtime.memmove 1.55%
    pkg/container/nulls.(*Nulls).materializeValidity 1.24%
    context.value 1.14%
    Q15 — 2.9156 application CPU s/query; 23.61 billion instructions/query; 100.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 26.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 }]).batchFillSum 8.19%
    pkg/container/hashtable.(*Int64HashMap).PlanInsertBatch 4.05%
    internal/runtime/syscall/linux.Syscall6 1.54%
    runtime.memclrNoHeapPointers 1.45%
    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 }]).BatchMerge 1.35%
    context.value 1.25%
    Q16 — 0.4833 application CPU s/query; 6.50 billion instructions/query; 99.11% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*StringHashMap).PlanInsertStringBatch 9.29%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 8.17%
    runtime.memmove 5.92%
    pkg/container/hashtable.(*StringHashMap).rehashInPlace 4.97%
    pkg/sql/colexec/aggexec.(*countColumnExec).BatchFill 4.44%
    pkg/common/hashmap.(*strHashmapIterator).prepareHashKeys 4.20%
    pkg/container/vector.unionT[go.shape.int64] 4.02%
    runtime.memclrNoHeapPointers 3.73%
    Q17 — 2.0282 application CPU s/query; 21.10 billion instructions/query; 100.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    runtime.mapaccess2_fast32 38.12%
    lz4block.decodeBlock.abi0 16.91%
    pkg/sql/plan/function.(*opOperatorIntegerIn[go.shape.int32]).eval 5.76%
    runtime.memmove 4.48%
    internal/runtime/syscall/linux.Syscall6 2.01%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 1.83%
    __vdso_clock_gettime 1.10%
    runtime.step 1.01%
    Q18 — 3.0671 application CPU s/query; 25.16 billion instructions/query; 99.67% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).PlanInsertBatch 33.30%
    pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill 11.12%
    lz4block.decodeBlock.abi0 9.97%
    pkg/container/vector.(*Vector).unionBatch 5.42%
    pkg/sql/colexec/group.(*container).preflightBuildChunk 4.16%
    pkg/container/hashtable.(*Int64HashMap).CommitInsertBatchPlan 4.11%
    pkg/container/hashtable.(*Int64HashMap).rehashInPlace 2.90%
    runtime.memclrNoHeapPointers 2.41%
    Q19 — 4.0688 application CPU s/query; 52.66 billion instructions/query; 100.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    lz4block.decodeBlock.abi0 18.90%
    runtime.memmove 6.18%
    pkg/container/types.CompareStringValues 5.59%
    pkg/container/vector.validateVectorBinary 5.29%
    cmpbody 4.34%
    pkg/container/vector.validateJSONPayload 3.97%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 3.46%
    pkg/sql/plan/function.equalFn.func20 3.38%
    Q20 — 2.2261 application CPU s/query; 17.95 billion instructions/query; 99.35% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/sql/colexec/aggexec.(*sumDecimal64FastExec).batchFill 18.27%
    pkg/container/hashtable.(*Int64HashMap).PlanInsertBatch 14.68%
    pkg/objectio.selectExactOrdered[go.shape.int32,go.shape.int32] 10.85%
    lz4block.decodeBlock.abi0 8.40%
    pkg/container/hashtable.(*Int64HashMap).rehashInPlace 5.06%
    pkg/container/vector.(*Vector).unionBatch 3.26%
    pkg/container/hashtable.(*Int64HashMap).FindBatch 3.02%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 2.61%
    Q21 — 7.1556 application CPU s/query; 83.95 billion instructions/query; 99.89% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 18.13%
    lz4block.decodeBlock.abi0 11.73%
    pkg/sql/colexec/hashjoin.(*container).probe 4.59%
    pkg/sql/colexec/table_scan.(*TableScan).evalFilter 4.16%
    pkg/container/vector.(*FunctionParameterWithoutNull[pkg/container/types.Date]).GetValue 3.31%
    pkg/container/vector.(*Vector).IsConstNull 2.67%
    runtime.memmove 2.29%
    pkg/container/nulls.(*Nulls).Contains 2.03%
    Q22 — 0.5783 application CPU s/query; 9.12 billion instructions/query; 99.27% known leaves
    Exclusive leaf (abbreviated) User CPU share
    pkg/container/hashtable.(*Int64HashMap).FindBatch 15.26%
    pkg/sql/colexec/hashjoin.(*container).probe 7.85%
    pkg/container/vector.appendOneBytesWithSource 7.56%
    pkg/sql/colexec/shuffle.getShuffledSelsByRangeWithoutNull 7.12%
    pkg/container/vector.(*Vector).UnionMulti 3.18%
    pkg/common/hashmap.fillKeys[go.shape.uint32] 2.63%
    internal/runtime/maps.(*Map).getWithoutKeySmallFastStr 2.52%
    runtime.memmove 2.23%
  3. aunjgr commented on Nov 3, 2026

    @aunjgr
    ContributorAuthor

    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
    Exclusive leaf (abbreviated) User CPU share
    void duckdb::AggregateFunction::UnaryScatterUpdate<duckdb::(anonymous namespace)::AvgState<duckdb::hugeint_t>, long, duckdb::(anonymous namespace)::IntegerAverageOperationHugeint>(duckdb::Vector*, duckdb::AggregateInp… 16.47%
    void duckdb::AggregateFunction::UnaryScatterUpdate<duckdb::SumState<long>, long, duckdb::(anonymous namespace)::IntegerSumOperation>(duckdb::Vector*, duckdb::AggregateInputData&, unsigned long, duckdb::Vector&, unsign… 16.14%
    duckdb::PerfectAggregateHashTable::AddChunk(duckdb::DataChunk&, duckdb::DataChunk&) 12.26%
    void duckdb::ScalarFunction::BinaryFunction<long, long, long, duckdb::MultiplyOperator>(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) 6.24%
    duckdb::VectorOperations::AddInPlace(duckdb::Vector&, long, unsigned long) 6.11%
    duckdb::SelectionVector::Slice(duckdb::SelectionVector const&, unsigned long) const 5.14%
    void duckdb::AggregateFunction::NullaryScatterUpdate<long, duckdb::(anonymous namespace)::CountStarFunction>(duckdb::Vector*, duckdb::AggregateInputData&, unsigned long, duckdb::Vector&, unsigned long) 4.11%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.07%
    Q2 — 0.1103 application CPU s/query; 1.65 billion instructions/query; 97.00% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 13.55%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 9.05%
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 8.61%
    int duckdb::DeltaDecode<int>(int*, int, unsigned long) [clone .isra.0] 5.68%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 5.12%
    duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned long*) 3.18%
    [unknown] 3.00%
    duckdb_fsst_decompress 2.81%
    Q3 — 0.4498 application CPU s/query; 6.72 billion instructions/query; 98.37% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 16.61%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 8.28%
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 7.89%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 4.40%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.20%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.69%
    duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool) 3.29%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 3.17%
    Q4 — 0.4393 application CPU s/query; 6.64 billion instructions/query; 98.73% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 23.24%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 10.80%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 5.42%
    duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*) 5.09%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 4.23%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 3.33%
    duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long) 3.12%
    duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool) 2.96%
    Q5 — 0.4767 application CPU s/query; 7.47 billion instructions/query; 99.46% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 23.64%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 11.90%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 5.45%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.30%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.11%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 3.61%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 2.92%
    duckdb_fastpforlib::internal::__fastunpack5(unsigned int const*, unsigned long*) 2.57%
    Q6 — 0.1918 application CPU s/query; 3.46 billion instructions/query; 99.87% known leaves
    Exclusive leaf (abbreviated) User CPU share
    void duckdb::FilterSelectionSwitch<long>(duckdb::UnifiedVectorFormat&, long, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 16.76%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 12.95%
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 12.48%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 7.86%
    duckdb_fastpforlib::internal::__fastunpack13(unsigned int const*, unsigned long*) 6.66%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 5.42%
    duckdb_fastpforlib::internal::__fastunpack4(unsigned int const*, unsigned long*) 5.39%
    duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*) 4.01%
    Q7 — 0.4231 application CPU s/query; 6.29 billion instructions/query; 98.97% known leaves
    Exclusive leaf (abbreviated) User CPU share
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 11.98%
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 6.47%
    void duckdb::PerfectHashJoinExecutor::TemplatedFillSelectionVectorProbe<int>(duckdb::Vector&, duckdb::SelectionVector&, duckdb::SelectionVector&, unsigned long, unsigned long&) 5.78%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 5.06%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.85%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 3.86%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 3.30%
    duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned int*) 3.10%
    Q8 — 0.4303 application CPU s/query; 7.50 billion instructions/query; 98.83% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 22.71%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 12.39%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 6.86%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.95%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 4.40%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 4.21%
    duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*) 3.70%
    duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned int*) 3.31%
    Q9 — 1.9220 application CPU s/query; 16.39 billion instructions/query; 96.81% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool) 26.51%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 7.80%
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 5.73%
    duckdb::JoinHashTable::Finalize(unsigned long, unsigned long, bool) 3.67%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 3.40%
    void duckdb::PartitionedTupleData::BuildPartitionSel<true>(duckdb::PartitionedTupleDataAppendState&, duckdb::SelectionVector const&, unsigned long, unsigned long) 3.30%
    [unknown] 3.19%
    duckdb::InitializeValidityMask(unsigned char* const*, unsigned long, unsigned long) 2.51%
    Q10 — 0.9581 application CPU s/query; 9.69 billion instructions/query; 94.87% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::ColumnSegment::FilterSelection(duckdb::SelectionVector&, duckdb::Vector&, duckdb::UnifiedVectorFormat&, duckdb::TableFilter const&, duckdb::TableFilterState&, unsigned long, unsigned long&) 14.90%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 6.45%
    [unknown] 5.13%
    duckdb_fsst_decompress 4.17%
    void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.91%
    duckdb::FastMemcpy(void*, void const*, unsigned long) 3.91%
    void duckdb::UnaryExecutor::ExecuteFlat<duckdb::uhugeint_t, duckdb::string_t, duckdb::UnaryLambdaWrapper, duckdb::(anonymous namespace)::StringDecompressFunction<duckdb::uhugeint_t>(duckdb::DataChunk&, duckdb::Express… 2.65%
    duckdb::StringHeap::AddBlob(char const*, unsigned long) 2.58%
    Q11 — 0.0676 application CPU s/query; 0.96 billion instructions/query; 98.35% known leaves
    Exclusive leaf (abbreviated) User CPU share
    void duckdb::PerfectHashJoinExecutor::TemplatedFillSelectionVectorProbe<int>(duckdb::Vector&, duckdb::SelectionVector&, duckdb::SelectionVector&, unsigned long, unsigned long&) 10.30%
    void duckdb::AggregateFunction::StateInitialize<duckdb::SumState<duckdb::hugeint_t>, duckdb::(anonymous namespace)::SumToHugeintOperation, (duckdb::AggregateDestructorType)0>(duckdb::AggregateFunction const&, unsigned… 7.80%
    duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&) 6.35%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 5.50%
    duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long) 5.35%
    int duckdb::DeltaDecode<int>(int*, int, unsigned long) [clone .isra.0] 4.95%
    duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned long*) 2.80%
    duckdb::hugeint_t::operator*(duckdb::hugeint_t const&) const 2.75%
    Q12 — 0.4293 application CPU s/query; 5.81 billion instructions/query; 99.49% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 15.99%
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 12.23%
    unsigned long duckdb::BinaryExecutor::SelectGeneric<int, int, duckdb::GreaterThan>(duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb::SelectionVector*) 8.41%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 6.82%
    duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*) 5.45%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 3.64%
    duckdb_fastpforlib::internal::__fastunpack3(unsigned int const*, unsigned int*) 2.96%
    duckdb_fastpforlib::internal::__fastunpack5(unsigned int const*, unsigned long*) 2.53%
    Q13 — 1.6176 application CPU s/query; 15.73 billion instructions/query; 83.53% known leaves
    Exclusive leaf (abbreviated) User CPU share
    [unknown] 16.47%
    duckdb_fsst_decompress 9.89%
    duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&) 9.79%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 8.58%
    duckdb::FindStrInStr(unsigned char const*, unsigned long, unsigned char const*, unsigned long) 8.22%
    duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long) 6.91%
    void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 6.25%
    void duckdb::PartitionedTupleData::BuildPartitionSel<true>(duckdb::PartitionedTupleDataAppendState&, duckdb::SelectionVector const&, unsigned long, unsigned long) 3.41%
    Q14 — 0.3338 application CPU s/query; 4.14 billion instructions/query; 92.40% known leaves
    Exclusive leaf (abbreviated) User CPU share
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 13.49%
    [unknown] 7.60%
    duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool) 6.63%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 6.60%
    duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*) 4.45%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 3.89%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.41%
    void duckdb::TupleDataTemplatedScatter<duckdb::string_t>(duckdb::Vector const&, duckdb::TupleDataVectorFormat const&, duckdb::SelectionVector const&, unsigned long, duckdb::TupleDataLayout const&, duckdb::Vector const… 3.19%
    Q15 — 0.2789 application CPU s/query; 4.02 billion instructions/query; 98.55% known leaves
    Exclusive leaf (abbreviated) User CPU share
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 14.41%
    duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long) 8.62%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 8.26%
    duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&) 7.76%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 5.72%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.31%
    duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*) 3.96%
    duckdb_fastpforlib::internal::__fastunpack17(unsigned int const*, unsigned int*) 3.92%
    Q16 — 0.3257 application CPU s/query; 3.28 billion instructions/query; 96.33% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::FastMemcpy(void*, void const*, unsigned long) 9.72%
    duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&) 8.57%
    duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long) 7.89%
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 4.72%
    [unknown] 3.67%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 3.30%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 2.84%
    unsigned long duckdb::Hash<duckdb::string_t>(duckdb::string_t) 2.80%
    Q17 — 0.5113 application CPU s/query; 8.27 billion instructions/query; 99.58% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 21.24%
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 16.51%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 16.19%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 6.45%
    duckdb_fastpforlib::internal::__fastunpack13(unsigned int const*, unsigned long*) 4.94%
    duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*) 4.77%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.96%
    duckdb_fastpforlib::internal::__fastunpack24(unsigned int const*, unsigned long*) 2.45%
    Q18 — 1.5310 application CPU s/query; 19.67 billion instructions/query; 98.82% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::GroupedAggregateHashTable::FindOrCreateGroupsInternal(duckdb::DataChunk&, duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector&) 23.32%
    void duckdb::PartitionedTupleData::BuildPartitionSel<true>(duckdb::PartitionedTupleDataAppendState&, duckdb::SelectionVector const&, unsigned long, unsigned long) 6.43%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 5.95%
    duckdb::HyperLogLog::Update(duckdb::Vector&, duckdb::Vector&, unsigned long) 5.92%
    void duckdb::TupleDataTemplatedGather<unsigned long>(duckdb::TupleDataLayout const&, duckdb::Vector&, unsigned long, duckdb::SelectionVector const&, unsigned long, duckdb::Vector&, duckdb::SelectionVector const&, duck… 4.06%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 3.42%
    duckdb::FastMemcpy(void*, void const*, unsigned long) 3.33%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 2.37%
    Q19 — 0.6627 application CPU s/query; 8.02 billion instructions/query; 90.41% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::ColumnSegment::FilterSelection(duckdb::SelectionVector&, duckdb::Vector&, duckdb::UnifiedVectorFormat&, duckdb::TableFilter const&, duckdb::TableFilterState&, unsigned long, unsigned long&) 15.91%
    [unknown] 9.59%
    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… 7.78%
    duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool) 4.27%
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 4.00%
    void duckdb::BitpackingScanPartial<long, long, unsigned long>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.72%
    duckdb_fastpforlib::internal::__fastunpack3(unsigned int const*, unsigned int*) 2.88%
    duckdb::SelectionVector::Slice(duckdb::SelectionVector const&, unsigned long) const 2.88%
    Q20 — 0.3905 application CPU s/query; 5.85 billion instructions/query; 99.37% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 12.97%
    void duckdb::FilterSelectionSwitch<int>(duckdb::UnifiedVectorFormat&, int, duckdb::SelectionVector&, unsigned long&, duckdb::ExpressionType) 12.87%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 9.23%
    void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 3.78%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 3.60%
    duckdb_fastpforlib::internal::__fastunpack21(unsigned int const*, unsigned int*) 3.57%
    duckdb_fastpforlib::internal::__fastunpack13(unsigned int const*, unsigned long*) 3.46%
    duckdb::BloomFilter::LookupHashes(duckdb::Vector const&, duckdb::SelectionVector&, unsigned long) const 3.39%
    Q21 — 1.4036 application CPU s/query; 17.51 billion instructions/query; 99.02% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 23.06%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 8.29%
    void duckdb::BitpackingScanPartial<int, int, unsigned int>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 4.76%
    unsigned long duckdb::BinaryExecutor::SelectFlat<int, int, duckdb::GreaterThan, false, false>(duckdb::Vector&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb::Selectio… 4.51%
    void duckdb::PerfectHashJoinExecutor::TemplatedFillSelectionVectorProbe<int>(duckdb::Vector&, duckdb::SelectionVector&, duckdb::SelectionVector&, unsigned long, unsigned long&) 2.75%
    long duckdb::DeltaDecode<long>(long*, long, unsigned long) [clone .isra.0] 2.71%
    duckdb::JoinHashTable::InsertHashes(duckdb::Vector&, unsigned long, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::InsertState&, bool) 2.59%
    duckdb_fastpforlib::internal::__fastunpack12(unsigned int const*, unsigned int*) 2.54%
    Q22 — 0.3304 application CPU s/query; 2.89 billion instructions/query; 99.08% known leaves
    Exclusive leaf (abbreviated) User CPU share
    duckdb::JoinHashTable::GetRowPointers(duckdb::DataChunk&, duckdb::TupleDataChunkState&, duckdb::JoinHashTable::ProbeState&, duckdb::Vector&, duckdb::SelectionVector const*, unsigned long&, duckdb::Vector&, duckdb::Sel… 37.12%
    duckdb::VectorOperations::Equals(duckdb::Vector&, duckdb::Vector&, duckdb::Vector&, unsigned long) 8.50%
    void duckdb::FSSTStorage::StringScanPartial<true>(duckdb::ColumnSegment&, duckdb::ColumnScanState&, unsigned long, duckdb::Vector&, unsigned long) 8.06%
    duckdb::StringVector::EmptyString(duckdb::Vector&, unsigned long) 7.62%
    duckdb::SubstringASCII(duckdb::Vector&, duckdb::string_t, long, long) 6.22%
    duckdb::VectorOperations::Hash(duckdb::Vector&, duckdb::Vector&, unsigned long) 3.29%
    duckdb_fsst_decompress 2.15%
    duckdb::ExpressionExecutor::DefaultSelect(duckdb::Expression const&, duckdb::ExpressionState*, duckdb::SelectionVector const*, unsigned long, duckdb::SelectionVector*, duckdb::SelectionVector*) 1.27%
  4. aunjgr commented on Nov 3, 2026

    @aunjgr
    ContributorAuthor

    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 sets SkipMemoryCacheWrites, 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.

  5. aunjgr commented on Nov 15, 2026

    @aunjgr
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions