Repository navigation
Description
Parent Issue
Detail of Subtask
Evidence reassessment — 2026-10-26
Current delivery/performance status: DESIGN/VALIDATION OPEN. Strong captured work-volume difference; proposed optimizer transformation remains unvalidated.
Observed: Pinned SF100 Q20 forms 54,543,918 MO intermediate groups after about 91.03M date-filtered rows; DuckDB restricts the corresponding aggregate to 989,835 rows and 593,278 groups. The 91.94x group-count ratio identifies extra work, not a 92x possible query speedup.
Not yet established: The legal and cost-effective candidate-key restriction for the current plan, including correlations, missing groups, duplicates and NULL-sensitive outer expressions.
Next discriminating experiment: Trace candidate keys and the aggregate boundary in current plans. Prove a generic restriction and its rejection cases; report actual aggregate input/groups, state bytes and total CPU before tuning update kernels.
Measured target: Unchanged Q20 with less aggregate work/state and a measured whole-query improvement under the same budget.
Mandatory controls and total cost boundary: Missing/duplicate outer keys, NULL correlations, empty/all-NULL SUM, changed predicates, nonselective candidates, build/filter startup and retained state.
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
- A reviewed optimizer rule states its proof and negation; deterministic tests include missing keys, NULL correlations, duplicate outer keys, empty aggregates and a nonselective negative control.
- For unchanged Q20 SQL, native plans show candidate-key restriction before the expensive aggregate and materially fewer aggregate inputs/groups.
- Report warmed CPU, instructions, intermediate state/peak memory and uninstrumented latency at the same host/budget; do not multiply a group-count reduction into a claimed query speedup.
- Coordinate with the generic runtime-filter task, but demonstrate this aggregate-boundary transformation independently.
Describe implementation you've considered
Use existing decorrelation, exact semijoin/key restriction and safe runtime-filter infrastructure. Compare early restriction with the current aggregate-first plan; retain the cheaper route for unselective candidate sets.
Coordination: Coordinate with #30844 filters and #30847 aggregate costs, while measuring this work-elimination rule independently.
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 Nov 16, 2026
Implementation: #32816. This is the current independent domain-restriction comparison against main
8e8708a8d3; results are appended here rather than replacing the issue requirements.Conclusion: aggregate membership domain restriction
Q20 wall changes -74.32%/-75.76%/-34.27%, user instructions
-64.11%/-63.79%/-45.69%, and Go allocated bytes -71.79%/-69.65%/-63.69% in
SF10 memory/SF10 disk/SF100 disk. Primary Total wall changes
-3.94%/-4.52%/-.89%. These gains do not excuse a control regression; original
slower values remain visible below.
Investigating the SF100 controls
Primary Q13/Q16 wall medians were +5.71%/+12.36%. Most slower controls have nearly
unchanged or lower non-GC instructions, with higher stalled cycles/kernel costs;
observed effective CPU frequency remains near4.9GHz. Q16's raw instructions fall
6.01% and its non-GC estimate falls1.83% despite the higher primary elapsed value.
A separate UNSCORED Q20 -> Q13 -> Q16 history probe brackets this branch with
identical main binaries, with one excluded cold pass/five warm passes and extra
TLB/cache counters. Its smaller cache history differs from the all22 qualification;
none of these samples replaces a primary value.
Q13 is essentially equal; Q16 wall lies between main references, with lower CPU
and instructions. The probe does not reproduce a stable control penalty from the
reduced Q20 work. Original source/rule/prefix/ownership logic was retained. No
sample removal, source rollback, latency threshold change or additional tradeoff
was used to make this assessment. Exact historical stall attribution remains
limited; these measurements are not a formal noninferiority proof or completion
of the broader umbrella's acceptance.
Measurement scope
Fresh current main
8e8708a8d306a69512d140b40bfcfebc1d404a32, which includes thefile-service revert, is the reference. Every arm is isolated; no pending allocator
or other optimization PR is included. Go1.27.1, SIMD/v3, function alignment64 and
matching native artifacts/release metadata are used. THP stays enabled with its
existing host policy; no VM policy or preconditioning is added.
One process per arm/configuration, one excluded cold Q1–Q22 suite followed by five
profiled warm full suites. All32 CPUs, 48GiB application/aggregate/join thresholds,
16GiB shared cache. Spill/swap/OOM and compiler/excess external-CPU interference
invalidate a capture. Two compact SF100 attempts overlapped Cargo and are retained
wholly excluded; no partial sample was pooled. The automated quiet resume reused
completed configurations. Benchmark SQL is executed/drained without checking
input/table/schema/row/reference-result/checksum contents.
Primary timings include GC and instrumentation. Total sums per-query medians;
no GC-subtracted wall time or independent-process confidence bound is claimed.
Native per-query counters publish asynchronously; the tables preserve their
limits. No globally exact copy-byte counter exists. Single-host/process evidence
cannot establish every-workload or population noninferiority.
Exact service pins
8e8708a8d306a69512d140b40bfcfebc1d404a32e50cd32c7844c2074d56aabbd8c20c07f32627d294286668dd1e231a89b63b067181ef4d29aaf50fbf116169187dd98f1e13a476b8d2e1b8ce96ccc3933d548c398e952b230edb2700fb8174aeaf56346ae04e0419ca2f1d0a8fc802cc331b8f7da3f382177bff739e338eb777e288702e269d20b1e4543a4043113a3a6bf4bf71de120f937e4002sf10-memory: all 22 queries, Total, CPU, instructions and allocations
Allocation counters include common process/scrape and asynchronous engine work. No globally exact copy-byte counter is available. GC CPU is measured process GC CPU, not a wall-time subtraction.
| Query | Main Go MB | Candidate Go MB | Go bytes Δ | Main Go objects | Candidate Go objects | Main GC CPU s | Candidate GC CPU s |
|---|---:|---:|---:|---:|---:|---:|---:|---:|
| 1 | 53.084 | 52.426 | -1.24% | 380858 | 383840 | 0.0000 | 0.0000 |
| 2 | 35.001 | 23.692 | -32.31% | 355925 | 316190 | 0.0000 | 0.0000 |
| 3 | 37.245 | 45.837 | +23.07% | 454717 | 489777 | 0.0000 | 0.0000 |
| 4 | 38.364 | 38.513 | +0.39% | 332364 | 337706 | 0.0000 | 0.0000 |
| 5 | 62.934 | 50.264 | -20.13% | 467834 | 419145 | 0.2210 | 0.0000 |
| 6 | 38.499 | 38.685 | +0.48% | 240494 | 267024 | 0.0000 | 0.0000 |
| 7 | 53.243 | 66.780 | +25.43% | 409656 | 416960 | 0.0000 | 0.2009 |
| 8 | 284.415 | 281.534 | -1.01% | 2416905 | 2399928 | 0.2974 | 0.2680 |
| 9 | 153.107 | 150.653 | -1.60% | 2454638 | 2445882 | 0.1918 | 0.0000 |
| 10 | 60.399 | 59.847 | -0.91% | 797448 | 780313 | 0.0000 | 0.0000 |
| 11 | 31.715 | 31.832 | +0.37% | 538175 | 544188 | 0.0000 | 0.0000 |
| 12 | 51.046 | 62.261 | +21.97% | 387770 | 419785 | 0.0000 | 0.2236 |
| 13 | 866.696 | 860.574 | -0.71% | 15293140 | 15271759 | 0.7167 | 0.6033 |
| 14 | 47.718 | 29.219 | -38.77% | 1009411 | 271347 | 0.0000 | 0.0000 |
| 15 | 57.032 | 54.701 | -4.09% | 670423 | 630011 | 0.0000 | 0.0000 |
| 16 | 39.455 | 32.126 | -18.58% | 652012 | 354498 | 0.0000 | 0.0000 |
| 17 | 78.841 | 64.714 | -17.92% | 537313 | 480254 | 0.2146 | 0.0000 |
| 18 | 43.579 | 52.677 | +20.88% | 372414 | 441253 | 0.0000 | 0.0000 |
| 19 | 72.620 | 72.317 | -0.42% | 590994 | 613929 | 0.0000 | 0.0000 |
| 20 | 129.643 | 36.574 | -71.79% | 2378804 | 342153 | 0.2127 | 0.0000 |
| 21 | 93.914 | 110.180 | +17.32% | 650130 | 692684 | 0.0000 | 0.2092 |
| 22 | 23.775 | 21.770 | -8.43% | 254990 | 239341 | 0.0000 | 0.0000 |
| Total | 2352.326 | 2237.176 | -4.90% | 31646415 | 28557967 | 1.8542 | 1.5049 |
Native allocation attribution limit: the default allocator publishes counters after a 100 ms window; MPool publishes after a one-second window. Their query-boundary increments are retained in raw JSON, but can belong to neighboring queries. They are not exact per-query allocation evidence and are not used to declare a per-query allocation pass. IO/cache counters overlap the default allocator and must not be added again. Long-window native totals also have endpoint lag; exact per-query native costs need separate operator/component evidence.
Faults/system CPU/read bytes belong to the measured application. THP fallback counts are host-wide supporting evidence; they neither automatically invalidate a result nor excuse an introduced resource regression.
Whole-warm peak GiB: main 20.843, candidate 20.935.
External process cores: main 0.442, candidate 0.488; interrupt cores separately: 0.355, 0.342.
GC attribution uses period-weighted instruction samples; non-GC figures are estimates, not exact foreground counters. Raw hardware instructions are above.
sf10-disk: all 22 queries, Total, CPU, instructions and allocations
Allocation counters include common process/scrape and asynchronous engine work. No globally exact copy-byte counter is available. GC CPU is measured process GC CPU, not a wall-time subtraction.
| Query | Main Go MB | Candidate Go MB | Go bytes Δ | Main Go objects | Candidate Go objects | Main GC CPU s | Candidate GC CPU s |
|---|---:|---:|---:|---:|---:|---:|---:|---:|
| 1 | 53.311 | 52.939 | -0.70% | 389193 | 389075 | 0.0000 | 0.0000 |
| 2 | 24.387 | 24.054 | -1.36% | 324302 | 330124 | 0.0000 | 0.0000 |
| 3 | 37.416 | 52.539 | +40.42% | 443405 | 489881 | 0.0000 | 0.2459 |
| 4 | 38.177 | 37.274 | -2.37% | 332261 | 309540 | 0.0000 | 0.0000 |
| 5 | 50.013 | 51.354 | +2.68% | 423472 | 427749 | 0.0000 | 0.0000 |
| 6 | 52.622 | 39.714 | -24.53% | 296198 | 274358 | 0.2004 | 0.0000 |
| 7 | 52.395 | 53.302 | +1.73% | 402642 | 409253 | 0.0000 | 0.0000 |
| 8 | 285.416 | 282.055 | -1.18% | 2417426 | 2373669 | 0.2990 | 0.2683 |
| 9 | 152.431 | 150.428 | -1.31% | 2448441 | 2468353 | 0.0000 | 0.0000 |
| 10 | 62.458 | 58.115 | -6.95% | 778893 | 759864 | 0.0000 | 0.0000 |
| 11 | 31.075 | 31.432 | +1.15% | 525749 | 536695 | 0.0000 | 0.0000 |
| 12 | 49.327 | 50.515 | +2.41% | 380860 | 384395 | 0.0000 | 0.0000 |
| 13 | 864.229 | 862.729 | -0.17% | 15307493 | 15298938 | 0.6292 | 0.6399 |
| 14 | 49.433 | 30.523 | -38.25% | 1035634 | 268127 | 0.0000 | 0.0000 |
| 15 | 64.901 | 55.129 | -15.06% | 722255 | 663369 | 0.0000 | 0.0000 |
| 16 | 39.459 | 33.779 | -14.40% | 668359 | 380408 | 0.0000 | 0.0000 |
| 17 | 79.946 | 79.744 | -0.25% | 519175 | 541089 | 0.2093 | 0.2040 |
| 18 | 53.700 | 43.529 | -18.94% | 413435 | 372823 | 0.0000 | 0.0000 |
| 19 | 71.321 | 69.947 | -1.93% | 583507 | 568904 | 0.0000 | 0.0000 |
| 20 | 126.967 | 38.531 | -69.65% | 2358312 | 372269 | 0.1890 | 0.0000 |
| 21 | 95.359 | 111.241 | +16.65% | 673108 | 697999 | 0.0000 | 0.2109 |
| 22 | 21.597 | 20.401 | -5.54% | 231100 | 211302 | 0.0000 | 0.0000 |
| Total | 2355.943 | 2229.273 | -5.38% | 31675220 | 28528184 | 1.5269 | 1.5690 |
Native allocation attribution limit: the default allocator publishes counters after a 100 ms window; MPool publishes after a one-second window. Their query-boundary increments are retained in raw JSON, but can belong to neighboring queries. They are not exact per-query allocation evidence and are not used to declare a per-query allocation pass. IO/cache counters overlap the default allocator and must not be added again. Long-window native totals also have endpoint lag; exact per-query native costs need separate operator/component evidence.
Faults/system CPU/read bytes belong to the measured application. THP fallback counts are host-wide supporting evidence; they neither automatically invalidate a result nor excuse an introduced resource regression.
Whole-warm peak GiB: main 15.510, candidate 15.347.
External process cores: main 0.425, candidate 0.505; interrupt cores separately: 0.351, 0.330.
GC attribution uses period-weighted instruction samples; non-GC figures are estimates, not exact foreground counters. Raw hardware instructions are above.
sf100-disk: all 22 queries, Total, CPU, instructions and allocations
Allocation counters include common process/scrape and asynchronous engine work. No globally exact copy-byte counter is available. GC CPU is measured process GC CPU, not a wall-time subtraction.
| Query | Main Go MB | Candidate Go MB | Go bytes Δ | Main Go objects | Candidate Go objects | Main GC CPU s | Candidate GC CPU s |
|---|---:|---:|---:|---:|---:|---:|---:|---:|
| 1 | 809.919 | 801.577 | -1.03% | 7673573 | 7605946 | 0.5375 | 0.5199 |
| 2 | 164.058 | 162.303 | -1.07% | 2070665 | 2086170 | 0.0000 | 0.0000 |
| 3 | 546.566 | 557.228 | +1.95% | 6702849 | 6724274 | 0.4762 | 0.4938 |
| 4 | 530.791 | 538.026 | +1.36% | 5130311 | 5116286 | 0.0000 | 0.0000 |
| 5 | 608.633 | 618.055 | +1.55% | 5818255 | 5780954 | 0.5865 | 0.5401 |
| 6 | 507.050 | 501.862 | -1.02% | 3953776 | 3928590 | 0.4489 | 0.0000 |
| 7 | 707.831 | 717.480 | +1.36% | 6514005 | 6447654 | 0.4764 | 0.5350 |
| 8 | 1056.896 | 1061.825 | +0.47% | 9440382 | 9459845 | 0.5503 | 0.5228 |
| 9 | 1703.960 | 1709.409 | +0.32% | 27772588 | 27769863 | 1.0240 | 1.2240 |
| 10 | 737.047 | 748.162 | +1.51% | 9741861 | 9795221 | 0.5024 | 0.4672 |
| 11 | 241.171 | 259.152 | +7.46% | 4168351 | 4264025 | 0.0000 | 0.4597 |
| 12 | 727.800 | 712.612 | -2.09% | 7098115 | 6984532 | 0.0000 | 0.0000 |
| 13 | 8467.333 | 8469.841 | +0.03% | 151563814 | 151567922 | 4.6997 | 5.2773 |
| 14 | 579.029 | 403.708 | -30.28% | 11716821 | 4213896 | 0.0000 | 0.0000 |
| 15 | 838.320 | 848.832 | +1.25% | 10306200 | 10277556 | 0.4717 | 0.5102 |
| 16 | 227.157 | 147.815 | -34.93% | 4784878 | 1681607 | 0.0000 | 0.0000 |
| 17 | 834.765 | 846.233 | +1.37% | 7668068 | 7641241 | 0.4539 | 0.5123 |
| 18 | 824.520 | 833.672 | +1.11% | 7451487 | 7460166 | 0.5066 | 0.5360 |
| 19 | 937.666 | 938.452 | +0.08% | 8925475 | 8888752 | 0.4812 | 0.6225 |
| 20 | 1303.275 | 473.225 | -63.69% | 25109687 | 5009155 | 0.4982 | 0.0000 |
| 21 | 1475.196 | 1484.638 | +0.64% | 13988428 | 13992683 | 0.5382 | 0.5780 |
| 22 | 79.478 | 79.086 | -0.49% | 798771 | 785795 | 0.0000 | 0.0000 |
| Total | 23908.459 | 22913.192 | -4.16% | 338398360 | 307482133 | 12.2516 | 12.7987 |
Native allocation attribution limit: the default allocator publishes counters after a 100 ms window; MPool publishes after a one-second window. Their query-boundary increments are retained in raw JSON, but can belong to neighboring queries. They are not exact per-query allocation evidence and are not used to declare a per-query allocation pass. IO/cache counters overlap the default allocator and must not be added again. Long-window native totals also have endpoint lag; exact per-query native costs need separate operator/component evidence.
Faults/system CPU/read bytes belong to the measured application. THP fallback counts are host-wide supporting evidence; they neither automatically invalidate a result nor excuse an introduced resource regression.
Whole-warm peak GiB: main 31.195, candidate 31.098.
External process cores: main 0.791, candidate 0.342; interrupt cores separately: 0.627, 0.610.
GC attribution uses period-weighted instruction samples; non-GC figures are estimates, not exact foreground counters. Raw hardware instructions are above.
All five primary warm wall times for every query
sf10-memory
sf10-disk
sf100-disk
perf(plan): restrict correlated aggregates to qualifying keys (#32816)
XuPeng-SH commentedon Nov 17, 2026
QA 交接(不是性能验收通过)
#32816 已于 2026-11-17 07:40 UTC 合入 main,merge SHA
919c9fc6e3dc15e2d2e5c905078bd05dff24e2bc。修复在正向 membership 已要求的 key domain 上,于相关聚合之前插入安全 SEMI restriction,保留原谓词与每个存活 key 的输入 bag,并通过成本门控保留不支持/不划算的原计划;同时减少 general-ci literal-prefix LIKE 的重复折叠分配。完整 issue/PR 评论、最终评审与合入设计已核对,无明确未完开发修复或已确认适用当前版本的反例,交 QA 继续语义及性能验证,不关闭本项、不代表总项 #30838 验收完成。证据归属:本轮没有本地实测。作者历史对比 main
8e8708a8与 candidate7181ef4d,SF10 memory/disk、SF100 disk 的 Q20 wall 分别 -74.32%/-75.76%/-34.27%,Total 为 -3.94%/-4.52%/-0.89%;这些是各配置单进程、排除一轮 cold 后五轮带 profiling 的结果,不是无插桩最终 merge SHA 成绩。最终冲突合并后作者报告 planner 包及全 static gate 通过,核心 domain/prefix 逻辑不变但未重跑 benchmark。最终评审报告完整 planner/function 测试、snapshot/join/rejection probes、build/vet、5-query SQLite oracle、9,216,512-case prefix differential 与分配 microbenchmark 通过;SQLite 不等于真实 MO 服务。合并队列记录 CI Required 成功;本轮未独立读取原始逐项 CI/性能 artifact。重要未验收边界:原 SF100 Q13/Q16 wall +5.71%/+12.36% 信号必须保留,不能用 Q20 收益或 Total 平均掩盖。后续独立、未计分的 Q20→Q13→Q16 bracket probe 未复现稳定控制退化,但缓存历史不同,不替代 all22,也不是正式 noninferiority 证明。最终整体 head 性能等价、无插桩目标收益、独立更长平衡对比、适用 SF100 memory/mixed-I/O 和 umbrella 资源验收仍待 QA;benchmark 只执行并消费结果,未验证数据/表/schema/行数/参考结果/checksum。原 issue 的全部验收条款继续有效。
建议 QA 先验证 unchanged Q20 的聚合输入/组数和 state 减少,再在相同整机预算下完成 Q1–Q22、Total 及控制查询的 wall/CPU/instructions/内存/IO 验证;区分 foreground、GC、后台与 kernel 成本。语义覆盖 duplicate/NULL outer keys、missing/all-NULL SUM、复合关联、非选择性/未知成本、unsafe/volatile/fallible 谓词拒绝、snapshot/binding identity、原 residual,以及 LIKE Unicode/畸形字节/ESCAPE/dynamic/fallback。正式确认的退化需回到研发,不以本交接替代性能验收或自动 backport。
Ariznawlll commentedon Nov 18, 2026
Note
QA 性能面补充验证:大数据量真机基准已实测(main
517e169538)。SEMI restriction 的计划形态在真数据上确认;白盒全过。保持 OPEN 至研发/负责人裁定。QA 补充:大数据量真机验证(#30843 相关子查询候选限制)
测试环境
main 隔离实例
517e169538(SQL 实测确认);真数据集同上(lineitem 5.5M / partsupp 800k / part 200k)。白盒
修复携带的
pkg/sql/plan/aggregate_membership_domain_test.go(191 行)+restrictAggregateMembership主链:本构建白盒全部 PASS(plan 包定向运行 ok)。真数据计划形态(Q20 形态,5.5M 行)
sum(cost)全量聚合 best 0.222s。真数据计时(复合场景)
p_name LIKE 'part name 1%'+ IN 子查询:best 0.222sRuntime Filter Probe: lineitem.l_suppkey),与 SEMI 限制协同无冲突。结论
func_like_prefix)随 PR 合入,白盒单测(func_like_prefix_test.go)本构建 PASS。Ariznawlll commentedon Nov 24, 2026
结论
测试不通过。原始选择性 Q20 的 work reduction 与耗时改善已复现,但必须覆盖的非选择性候选集对照出现可重复的性能退化;本 Issue 保持开放,交回原实现负责人继续处理。这里没有发现结果集错误。
关键证据
main@9fdbc415b9171dc16e0c02f2b366a3dc612516fd,实际服务git_version()完整匹配。SDK 构建树过滤了非运行文档,Go build-info 的vcs.modified=true;构建时已检查生产pkg/cmd没有相对该官方源码的修改,未将整棵 SDK 工作树声称为 clean。对照95b7755802da464c1adad651122616c269209cf1是本地 QA commit:在同一 main 上仅撤销 PR #32816 的四个生产文件,包含 membership rule 与 LIKE 改动,不是官方旧 release,也不能把差值全部归因于单个 SEMI JOIN 函数。相同 Go 1.27.1、GOAMD64=v3、SIMD、funcalign64 与构建时间,两个 ELF 的 SHA256 分别为8a8f8efa105d995093a6071beb0d2e8d14f06d1eece763e8ea8d0052325e1d2c/ca84f93ed1671bb01d7bf6c3189f80bf1d205c1b90041ff958767dee0254ece0。/proc/io和 cgroup 物理读写均为 0;spill watcher 无事件/无溢出,memory-limit hits/OOM 为 0,主机无 swap。内核没有 PSI 接口,因此未声称已取得 PSI 证据。早期磁盘镜像测试发现后台写入,已排除出严格 RAM 结论。p_name LIKE 'forest%'改成p_name LIKE '%',作为本 Issue 明确要求的非选择性对照,不修改 qualification 文件、不混入 Total。18 个新进程遍历 A0/A1/B 的六种顺序;A0/A1 是完全相同的官方 ELF。每进程排除 22-slot cold,再独立执行 Q19、此 Q20 各 16 次。以六个进程块的 log-ratio、Student-t(df=5) 计算:非选择性 Q20 wall +10.15% [ +6.43%, +14.00% ];whole-app CPU +11.82% [ +8.26%, +15.50% ]。两边进程中位耗时分别为 0.79249 s / 0.71662 s。六块 wall 原始变化为 +4.85%、+7.85%、+10.61%、+15.35%、+12.14%、+10.39%,全部同方向。相同 ELF 的 A/A 为 +2.12%,区间 [−0.54%, +4.84%]。Q19 的 +2.01% 区间 [−1.93%, +6.12%],仍不确定,未算作确认退化或等价。%下官方仍加入 SEMI JOIN,但聚合上游仍为 9,099,165 行、5,441,669 groups,与无该 rule 的对照完全相同;新增 Join 的 reported MemorySize 为 583.63 MiB。同一官方版本将该 NOT NULL 列的LIKE '%'换成等价TRUE后,Aggregate 上游回到直接 Table Scan,行数/groups/最终结果不变。这证明非选择性路径增加了没有减少聚合工作量的限制步骤;计划中的 Aggregate 自身 inputRows=0 是 analyzer 口径,未将它误当成真实零输入。aggregateMembershipCostAllows已检查 NDV 与预计 saved/extra;原 UT 也覆盖人为设置 selectivity=1 的拒绝。因此这里不是“完全没有成本判断”。但真实 SF10LIKE '%'仍到达了额外 SEMI 路径;需要核对真实统计估算与准入输入,不能只用该 mock UT 代替负对照。具体哪一个估计值失准尚未注入采集,不将它当作已确认的细分根因。%与等价 TRUE 均返回 4,054 行,A/B 完整 bag 也一致。NULL、重复/缺失候选 key、空/all-NULL aggregate 等确定性语义对照已补入同一个 MOTR PR #374,具体 driver;这些功能回归不能替代此项性能门槛。正式 RAM 原始证据与分析归档 SHA256 为770ce8cd3b9e8aba6013596f938ab34478ed9b3c883724e8faf6523dc913fde5,包含逐臂记录、分析 JSON、实际计划与 SQL。1b50c67ceaf39e6f6ff9b567c579b2843ea46fc6;相对已测版本的 4 个新提交没有修改本次 optimizer/membership/LIKE 路径。实际运行版本仍是上面的冻结 SHA,未声称已运行新 head。非选择性 SQL(标准 SF10 schema/data;该次计分 SQL 完整如下):
待解决点
fix(plan): skip unselective aggregate membership joins for match-all …
XuPeng-SH commentedon Nov 25, 2026
补充已合入的专项复测范围(保持 Ariznawlll / OPEN):#33222 main merge
46c2d3eb08f8e0c7b8c6a434ec641dc2b3ceeadb修正 match-all LIKE 的成本估算,作者在 SF0.1 用同数据对照确认全域非空列不再引入无收益 SEMI JOIN,并保留小候选集和高 NULL 比例下有收益的路径。独立复审定向 planner 测试通过;本轮未重跑。请在实际包含合并 SHA 的版本复跑此前 SF10 的同机 A/B:原 forest% 正对照、LIKE '%' 负对照与等价 TRUE,分别比较实际 Aggregate 输入/组数、wall/CPU 及峰值开销,并校验结果集。旧版本 +10.15% 反例不能直接判新版本失败,也不能用 SF0.1 代替原反例。SF10/SF100 的 RAM 和 mixed-I/O qualification 未闭环。
Ariznawlll commentedon Dec 2, 2026
结论
测试通过(限本次与用户确认的已交付实现及实际验证范围),按该范围关闭本子任务。SF10/SF100 同机 A/B 的完整 Q1–Q22 结果校验通过,目标 Q20 有稳定耗时收益。本次关闭不代表原 umbrella 协议中的独占机器、严格 RAM 与全部资源计量条款均已验收;这些边界明确保留,不再作为本子任务继续扩展测试的关闭前提。
关键证据
版本与对照
32ffdd4ac2722972be184af63906c8f23901e323,包含 match-all LIKE 成本修复 #33222。不是将发布评论时的最新 main 冒充实测版本。builder.restrictAggregateMembership(rootID)的 QA 对照,B 不是官方旧版本。相同 Go 1.27.1 / SIMD / GOAMD64=v3;构建关闭 buildvcs 自动采集,版本由构建注入,不能仅凭二者显示同一 CommitID 就声称 B 未修改。d6fb82f9f8e6c7dfd5469bbdfbbbc635d8ebd5b8ea05c048b2bb40a8d6bafecc。9a6af2496a76df630159aa61e5ab1ad58106c963d8a46b5849224ca06c6c42b。完整 qualification SQL 对照
在 128 独立实例和端口执行,同机比较,未停止其他任务。按固定 qualification DDL 重新建表并加载 SF10 / SF100;lineitem 行数分别为 59,986,052 / 600,037,902。每个规模独立执行 8 臂
ABBABAAB,每臂排除 1 套参考/预热,再计时 5 套 Q1–Q22;每个规模 880 次计时 query lifecycle。Q15 保留创建 view、查询、删除的生命周期。每臂参考阶段消费完整结果,比较排序后的完整结果 bag 指纹及列元数据;计时阶段消费全部结果并检查行数。两个规模全部 22 条查询的参考结果及元数据在 A/B 间一致;这属于 A/B 一致性验证,不声称本轮使用第三方数据库逐行 golden。
以每臂五次 wall 中位数形成四个配对,再以 log-ratio、Student-t(df=3) 计算区间;负数表示 A 耗时降低:
SF100 的 Q20,各臂中位数再取中位数:A 4.7870 s / B 7.9580 s;服务进程 CPU 为 A 25.73 s / B 53.48 s。CPU 仅为服务进程口径,不是 whole-application 计量。
SF100 全套 8/8 臂完成,所有服务退出码为 0。其他查询 wall 配对变化依次为:Q1 −0.28%、Q2 −0.07%、Q3 −1.28%、Q4 −1.25%、Q5 −0.93%、Q6 −0.03%、Q7 −0.68%、Q8 −0.15%、Q9 −2.86%、Q10 −0.84%、Q11 +2.03%、Q12 −0.41%、Q13 +0.17%、Q14 −0.56%、Q15 +0.18%、Q16 +1.62%、Q17 −1.05%、Q18 −2.52%、Q19 +0.11%、Q21 −1.39%、Q22 −1.40%。所有正变化的区间都跨 0;未发现本轮统计上确认的控制退化,但这不构成正式 noninferiority 证明。
负对照与较慢信号的复核
forest%、非选择性LIKE '%'和等价 TRUE,结果一致。SF10 的非选择性 wall 变化为 −1.21% [−4.97%, +2.70%],TRUE 为 +0.02% [−2.19%, +2.28%];本环境未复现旧记录中的稳定 +10.15% 退化。回归去向
此前 MOTR #374 已由 MOTR #403 汇总替代;#403 已于 2026-12-01 合入。对应语义控制 driver保留 NULL、重复/缺失候选键、空/all-NULL 聚合等确定性检查。这是功能回归去向;不将其声称为上述专机性能基准已纳入每日调度。
待解决点
最终结论:按本次确认的收尾范围测试通过并关闭本子任务。已通过:SF10/SF100 完整 Q1–Q22 A/B 结果一致性、目标 Q20 耗时收益及上述独立控制复核;未完成:原 umbrella 严格 RAM/mixed-I/O 与完整资源协议验收。关闭不表示这些原始条款已全部测试通过。