Repository navigation
perf(scan): apply complete local key domains before shuffle and probing - #32098
Conversation
|
Merged authoritative main and resolved the add/add design-document conflict in The previous failed Compose jobs stopped during HTTP504 dependency downloads (including Java setup), and coverage aggregation was blocked by missing producer profiles. Fresh CI is running on the new head; this is not a CI-green claim. SF100 acceptance remains outstanding. Superseded benchmark-table comments are now collapsed as outdated. The latest complete SF10 result remains visible: #32098 (comment) |
This comment has been minimized.
This comment has been minimized.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 8c6bf4601c282f8a3b36be07f90a2ae4c042477c
Assessment: approve
The bounded domain owner is justified by early scan rejection and reuses existing lineage, Bloom and selection paths. Source-matched Q9 gains address the earlier performance objection. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed all 24 changed files and affected owners; reconciled all 13 discussion keys and both linked issues. Source remains unchanged. Records: discussion-assessment.json, closure-assessment.md, final-evidence-audit.log.
-
Focused normal tests passed in five packages, including all 14 new top-level tests: focused-tests.jsonl; checks/1794224787630981162-2.json.
-
Race checks passed: 100 exact ConcurrentSources repetitions and all 73 top-level tests across Bloom, runtimefilter and table_scan. Logs and matching receipts are indexed in validation-ledger.json.
-
Private-runtime preflight passed. Recovered Go 1.27.1 and built native prerequisites; native-evidence.json verifies 196 input and seven output hashes. Generated descriptor audit confirms only additive Query field 23 and two messages.
-
SF10 candidate/control executable trees match the measured revisions; SF100 pins this exact head/base. Reused supplied five-pair RAM/disk results, all-query/Total checks and completed successful CI evidence.
Limitations:
-
SQL/BVT and TPC-H were not rerun locally. SF100 Q17 has a positive raw RAM interval, without a Holm-confirmed regression under the agreed acceptance rule.
-
Duplicate CI runs remain pending in the snapshot. One unrelated planner interval-expression subtest was skipped and received no validation credit.
|
Report-label correction: the earlier generated report mistakenly said that SF1000 qualification remained required. The approved gate here is SF10/SF100, and both are complete. All measurements, intervals and acceptance decisions are unchanged. The earlier table comment is superseded by this corrected copy. SF100 acceptance for the unfiltered-probe revision: PASS for these source pins. Main This campaign uses the requester-approved process CPU guard: host user/nice/system/steal minus application CPU, with the unchanged2-core ceiling; IRQ/softIRQ and the old combined counter remain recorded separately. Prior exclusions were preserved. These are fresh matching arms; no failed earlier run was reclassified. Only193,408 bytes of compressed measurement metadata were fetched; the loaded SF100 database stayed on server129. The declared gate requires a confirmed Q9 memory benefit plus no confirmed Q1–Q22/Total regression in either profile. The matching SF10 qualification is in the SF10 result comment. Benchmark tables are kept out of the PR description. Early complete-domain screen: PASS. SF100 qualification complete; SF10 is reported separately. Five independent process pairs per mode, one excluded cold full suite and one scored warm full suite per startup. All Q1–Q22 are executed/drained. Times below are paired sample means; Total is the sum of per-query wall/CPU times. Raw paired 95% intervals and Holm query tests are retained. No data/result verification. Cache-resident native backing (zero scored physical reads) SF100
Disk-backed warm SF100
CI passes and this PR is ready for review. |
…filter # Conflicts: # pkg/sql/compile/types.go
|
Resolved the main conflict and pushed Focused local-domain compiler/planner tests pass, and the mandatory full pre-push static gate passes with zero issues. The domain producer, probe, binder and planner implementation files are unchanged from the qualified |
|
@fengttt Your November 5 review was against The current evidence shows a Q9 latency reduction in all four measured profiles and a confirmed SF100 memory-profile improvement in the full Q1–Q22 total:
Total is the sum of Q1–Q22 query wall times. Percentages and intervals use the paired analysis, rather than ratios of rounded means. Full per-query wall/CPU tables and protocols: SF10, SF100. There is a concrete reduction in work behind these results. Q9's filtered PART keys are a necessary condition for both PARTSUPP.ps_partkey and LINEITEM.l_partkey, including the part-key component of the latter's composite join. The PR collects that domain from the already-required filtered PART scan, waits for complete source membership, and applies a single Bloom filter to eligible unfiltered scan output before payload routing, shuffle and hash probing. Exact joins and their order remain in place. Separate, unscored SF10 work diagnostics for the qualified revision show 108,782 source keys with all 32 source workers completed, followed by:
That removes about 94.56% of those input rows from the downstream stages. Initial scan/decode work remains; the saving comes from handling fewer payload rows and performing fewer downstream probes. The measured SF100 Q9 CPU time also falls: 287.93 → 170.39 CPU-seconds in memory (−40.82%) and 331.84 → 223.95 CPU-seconds on disk (−32.51%), summed across application workers. The aggregate result is consistent with this mechanism: in SF100 memory, Q9 saves 2.356 mean wall seconds, while the entire suite saves 2.395 seconds. Q9 accounts for almost all of the observed suite improvement. The other three Total intervals include zero, so those profiles support a Q9 improvement rather than a confirmed suite-wide gain. The profitability restriction matters. Earlier eager-filter experiments improved Q9 but regressed Q10; those variants were rejected and their tables are collapsed as historical evidence. The current rule applies only to scans without existing row/block/runtime filters, so it avoids adding post-reader membership work to already-filtered inputs. Current Q10 diagnostics show no optional domain activity. This is a structural rule, with no query-name special case. Admission also retains the 10% completed-source/probe-NDV threshold and a combined 64 MiB query cap; the SF10 diagnostic used approximately a 1 MiB native filter and 5.52 MiB admitted peak. Each case compared this PR alone with its matching main, using five independent process pairs per profile and excluding each process's complete cold suite. Resource settings match within each pair. Accepted runs have no spill/swap/OOM; SF100 memory scores require zero physical reads. All 22 queries are included in the previously agreed Holm slowdown screen, with a separate Total gate. One caveat remains visible: SF100 memory Q17 is 1.0830 → 1.1987 s, with paired +10.64% and raw 95% CI [+1.58%, +20.50%]. Its Holm-adjusted p-value is 0.333, so it does not trigger the declared regression gate. Its cause is unresolved; I am retaining that signal explicitly rather than treating it as proven noise. The measured source pins are The supported optimization claim is therefore specific: materially lower Q9 wall and CPU cost, plus lower SF100 memory-suite wall time, with the full-suite checks and residual Q17 signal exposed for review. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 98084d16ea37ee7de371241caa07876c561389a1
Assessment: approve
The bounded completion owner enables early scan rejection while reusing existing lineage, Bloom, selection and resource-budget mechanisms. Qualified Q9 gains address the objection to the superseded shuffle-only implementation. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all 24 changed files and affected owners; reconciled all 18 discussion keys. Source remains unchanged.
-
All 14 new focused tests passed. Full normal runs passed in all six owning packages.
-
Race checks passed: all 73 shared-owner tests and 100 repetitions of each of nine lifecycle/concurrency tests.
-
Private-runtime preflight passed; 196 native inputs and seven output hashes verified. Generated-code audit confirmed additive Query field 23 and two messages.
-
Reused supplied current-head CI results and pinned SF10/SF100 qualification after source comparison. Receipts and retained logs reconcile in validation-ledger.json and final-evidence-audit.log.
Limitations:
-
SQL/BVT and TPC-H were not rerun locally. Benchmark numbers remain tied to their reported revisions; later common-main changes, including decimal aggregation, were reviewed without fresh timing claims.
-
SF100 Q17 retains an unresolved positive raw memory interval, without a Holm-confirmed regression under the agreed rule (adjusted p=.333). Two unrelated planner subtests were skipped and receive no validation credit.
|
mo-bot review · Commit: "interrupted" |
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30844. Part of #32379.
What this PR does / why we need it:
Reject impossible integer-key rows in eligible unfiltered local scans before payload routing and hash probing. Collect a complete necessary domain from an independent filtered primary-key scan and propagate it through proven INNER-join equality lineage, including a component of a composite join. Existing row/block/runtime-filtered readers keep their current path; composing membership before their predicates belongs to the separate reader integration. Keep the exact join, SQL types, join order, estimates and placement unchanged.
Use one query-generation-owned Bloom filter per domain, sized from its estimate and admitted with all producer/probe scratch under the execution budget and a combined 64 MiB query cap. Publish immutable membership only after every actual source worker completes. Each target retains the strict 10% build-cardinality/probe-NDV gate, using completed source keys; stop optional construction early with PASS when every target is already unprofitable. Unknown hints, unsupported topology, partial construction and optional admission failure use ordinary execution; genuine query errors retain their outcome.
Apply completed membership in TableScan with reusable scratch and ordinary NULL/constant semantics. Preserve existing join-map readiness, cancellation and scope ownership. Remap optional annotations through the optimizer's final node compaction using node identity, then independently revalidate them before binding to actual scans. Keep unproven computed projections on ordinary execution and remove the superseded private-per-producer shuffle hook.
Design
Approved early-domain design and completed-cardinality amendment. The separate dictionary foundation is #32394; this implementation enables no dictionary producers and does not depend on it.
Current consumer-cost boundary and final-compaction implementation notes are versioned in the implementation design.
Validation
Owning planner/compiler, Bloom/runtime-domain and TableScan tests, focused lifecycle race stress, and a self-contained SQL BVT cover lineage, final node renumbering, duplicate/NULL/constant/empty keys, unsafe boundaries, independent source fanout, partial preparation, cost/budget fallback and cleanup. Live activation/work diagnostics and all benchmark evidence are appended in the conversation.
Performance acceptance
The replacement passes the declared source-pinned SF10 acceptance and SF100 acceptance: a confirmed Q9 memory-profile wall-time benefit at both scales, with no confirmed Q1–Q22 or Total regression in either memory/disk profile. Five independent process pairs per profile, cold full suites excluded, Holm query checks and a separate Total check. Any SF100 spill invalidates the run. Benchmark scripts execute/drain and collect resources without data/schema/row/result verification. Historical variants and their former acceptance rules remain in comments; they do not qualify this replacement.