Repository navigation
Description
Parent Issue
Detail of Subtask
Evidence reassessment — 2026-10-26
Current delivery/performance status: DESIGN/VALIDATION OPEN. Compare work volumes before interpreting hash-kernel percentages.
Observed: Pinned SF100 Q9 scans 80M PARTSUPP rows in both engines, but DuckDB sends about 4.79M onwards after filtering while MO sends 80M. Join orientation also differs. Q21 filter effects and Q17 hot mechanisms change with scale; SF10 claims cannot be copied into SF100.
Not yet established: Which filters/orientations remain ineffective on current main, their actual selectivity and delivery cost, and how much hash CPU is extra work versus expensive equivalent probes.
Next discriminating experiment: Measure build rows, filter construction/probe counts, selectivity/false positives, join input and result rows at each affected operator and scale. Separate filter placement, join orientation and intrinsic lookup cost.
Measured target: Unchanged Q9/Q21 and scale-specific Q17 controls with fewer unnecessary probes and lower query CPU/latency.
Mandatory controls and total cost boundary: Unselective filters, tiny inputs, expensive builds, skew/duplicates, NULL-aware membership/anti joins, late filter arrival, cancellation and pressure.
Performance acceptance and rejection
- Freeze current-main/candidate sources, executables, real caller shapes and effective settings. Use the unchanged qualification SQL and complete result consumption; exclude cold runs and keep profiles separate from latency scoring.
- Demonstrate the named work/CPU reduction and an attributable uninstrumented target-query improvement. Include the controls below and full Q1-Q22 comparison; component wins, source changes, functional tests, SCA, merging and profile percentages are separate evidence.
- A confirmed affected/control slowdown fails; unresolved slower signals are inconclusive. Confirm with an independent longer balanced run. No gain elsewhere, favorable average or self-approved tolerance waives a regression.
- Complete applicable SF10/SF100 and memory/mixed-I/O acceptance before issue closure under the umbrella protocol. Report uncertainty, absolute CPU/instructions/work, allocations/copies and the same whole-application budget, effective cache, I/O/spill/swap/pressure evidence. Benchmark scripts do not verify input/table/schema/row counts/reference results/checksums.
Semantics and lifecycle requirements retained
- Native plans and actual work counters show where filters are built/probed and how many rows reach each join at SF10 and SF100.
- Focused tests preserve exact joins, NULL-aware membership/anti joins, duplicate handling and false-positive correctness; filter generation has bounded memory and terminal cleanup.
- Measure filtered/unfiltered and alternative build/probe controls under the same budget, including low-selectivity and build-cost negative controls.
- Separate work-volume gains from any intrinsic hash-table gain; retain exact joins after approximate filters.
Describe implementation you've considered
Fix existing filter eligibility/placement/transmission or costed build/probe choices where supported by actual work. Preserve the exact final join and bounded filter ownership; a Bloom filter is a rejection aid, not an exact IN/NOT IN implementation.
Coordination: #30843 owns pre-aggregate restriction; #30846 owns cost per equivalent probe; #30845 owns attributed materialization.
Additional information
- Reassessed profile/caller evidence and delivery ledger.
- Historical MO source
873282742714436bff407dfcdbbe879147162bd3; DuckDB069cc9f9b5be802405797faecc284961b07c70ef. SF10 all-query profiles; SF100 results/profiles; mixed-I/O evidence. These are pinned historical captures, not current-main scores. - No new query/benchmark was run for this reassessment. Foreground query work, engine background maintenance, kernel CPU and off-CPU waits must be distinguished; all remain inside whole-application resource accounting.
Pinned implementation / plan references
Activity
aunjgr commentedon Oct 31, 2026
Current-main exposure gate: leading-component filter-budget candidate stopped
Main
1565fb79ab3a230f0e383300b5be47a4b7ae6cda, local original-schema SF10, eight physical CPUs, effective 16 GiB cache and 32 GiB application budget. Cold calls were excluded. This is a diagnostic capture, not a latency acceptance result: the host CPU gate failed. All owned services exited and cleanup completed. No benchmark input/schema/table/row/reference/result/checksum verification was run; the rows below are engine EXPLAIN ANALYZE operator counters.Q9 still sends all 8,000,000 PARTSUPP rows to the PART/PARTSUPP join. The filtered PART side returns 108,782 keys, and the join returns 435,128 rows. That join is shuffle: range(partsupp.ps_partkey). Current
generateNodeRuntimeFiltercreates dependency-only shuffle specs, andHashBuild.handleRuntimeFilterpublishes PASS for them. Raising the broadcast leading-component IN limit therefore cannot address this observed gap.Q21's large witness/order joins are also shuffled. Its smaller broadcast joins probe supplier's single-column key or lineitem's nonleading supplier key; neither exercises the proposed leading-composite-component budget change.
Decision: stop this narrowly approved runtime-filter candidate without a production patch or optimization PR. The broader #30844 stays open. Effective shuffle-scan filtering requires its own costed delivery/ownership design; neither join-order changes nor a new distributed filter protocol are silently added to this candidate. #30842 remains deferred.
Current Q9 physical plan
Current Q21 physical plan
docs: design early runtime filtering and dictionary vector execution (#…
perf(scan): apply complete local key domains before shuffle and probi…
XuPeng-SH commentedon Nov 10, 2026
合并范围记录:PR #32098 已于 2026-11-10 01:16 UTC 合入 main,SHA
de2790be20948f9d99cb833ddbbaa8a792b7a2ac。它实现独立过滤主键扫描的完整 local key domain,在符合条件的未过滤本地扫描中于 shuffle/probe 前拒绝不可能匹配的整数键;保留精确 join、join order 与 placement,不改变 build/probe 方向。已有 row/block/runtime filter 的 reader 仍走原路径,其组合属于后续 reader integration。作者对 replacement 的 source-pinned SF10/SF100 结果见 #32098 (comment) 和 #32098 (comment) 。这些结果报告 Q9 收益及声明的全查询/Total gate 通过;不是旧 shuffle-only 版本的验收,也不是本次对 merge SHA 的本地复测。作者另保留 SF100 memory Q17 原始区间的变慢信号及未达 Holm gate 的限制,见 #32098 (comment) 。
本 issue 仍覆盖更广的 Q9/Q21、scale-specific Q17、过滤传递及替代 build/probe 选择;此次合并是其中一部分,不能据此把整个工单标为开发完成或验收通过。保留 aunjgr 与 open 状态,不整项转测。本轮仅核对远端合并信息、issue 全部评论及 PR 的范围/证据记录,未运行本地测试。