A research proposal generated by Ariadne. The experiments below are planned, and the review scores describe this internal selection.
核心洞见: 估计误差沿 join 相乘,所以 log 误差可加。每个观测到的中间结果大小因此是对共享隐变量(误差原子)的线性测量。运行时反馈变成一个廉价的反问题,其可辨识性与最优测量设计成为核心问题,并且有微秒到毫秒级的闭式更新。
本轮 top-k 排名稳定性 — · BT 强度 — · AC 加权分 3.0/5(borderline)· 查新 NEAR(风险 high,证据等级 websearch)· 扛过红队 1 轮 · direction: Plan-decision value and optimality certificates
AC 指出的致命问题: The core additive log-error atom model, with join atoms keyed independently of co-occurring filters, is (a) close to LEO's per-predicate adjustment factors and ISOMER-style max-entropy propagation, and (b) systematically violated by filter-join correlation, the dominant error source on JOB and STATS-CEB. Novelty and validity therefore both depend on an unverified assumption.
AC 的改进建议:
- Run the offline additivity study first (month 1). Report held-out explained variance of log-error for: edge-only atoms, edge×filter-context atoms, and LEO per-predicate factors. Make identifiability and atom-granularity the central contribution.
- Add LEO (implemented faithfully with per-predicate factors) and ISOMER/max-entropy consistent selectivity as baselines. Explicitly position the work against the 2026 online linear-selectivity paper.
- Extend atoms with interaction terms, for example filter-conditioned join atoms with hierarchical shrinkage to the edge-only atom, so filter-join correlation is handled instead of Huber-downweighted.
- Replace 1% uniform samples for selective joins with correlated/join samples or early-terminated exact counts. Quantify probe error and cost separately.
- Evaluate on non-templated and ad hoc streams (CEB random templates, DSB with varied parameters) and report per-query regressions. Ablate propagation, probe design and the re-planning gate.
把每个观测到的中间结果真实大小视为对隐藏的"逐边/逐过滤器 log 误差原子"的一次线性测量,用免训练的闭式 Bayesian(Kalman)后验把反馈传播到未观测子集和后续查询,并用后验不确定性决定是否重规划、该探测哪些子计划。
Core insight: Estimation errors multiply along joins, so log-errors are additive. Each observed intermediate-result size is therefore a linear measurement of shared latent variables, the error atoms. Runtime feedback becomes an inexpensive inverse problem, with identifiability and optimal measurement design as central questions and closed-form updates taking microseconds to milliseconds.
Top-k ranking stability — · BT strength — · AC weighted score 3.0/5 (borderline) · Novelty assessment NEAR (risk high; evidence level websearch) · Survived 1 red-team round · direction: Plan-decision value and optimality certificates
Fatal concern identified by the AC: The core additive log-error atom model, with join atoms keyed independently of co-occurring filters, is (a) close to LEO's per-predicate adjustment factors and ISOMER-style max-entropy propagation, and (b) systematically violated by filter-join correlation, the dominant error source on JOB and STATS-CEB. Novelty and validity therefore both depend on an unverified assumption.
AC recommendations:
- Run the offline additivity study first (month 1). Report held-out explained variance of log-error for: edge-only atoms, edge×filter-context atoms, and LEO per-predicate factors. Make identifiability and atom-granularity the central contribution.
- Add LEO (implemented faithfully with per-predicate factors) and ISOMER/max-entropy consistent selectivity as baselines. Explicitly position the work against the 2026 online linear-selectivity paper.
- Extend atoms with interaction terms, for example filter-conditioned join atoms with hierarchical shrinkage to the edge-only atom, so filter-join correlation is handled instead of Huber-downweighted.
- Replace 1% uniform samples for selective joins with correlated/join samples or early-terminated exact counts. Quantify probe error and cost separately.
- Evaluate on non-templated and ad hoc streams (CEB random templates, DSB with varied parameters) and report per-query regressions. Ablate propagation, probe design and the re-planning gate.
Treat each observed true intermediate-result size as a linear measurement of hidden per-edge/per-filter log-error atoms. Use a training-free, closed-form Bayesian (Kalman) posterior to propagate feedback to unobserved subsets and later queries, and use posterior uncertainty to decide whether to replan and which subplans to probe.
Why the contribution could be memorable
属于 跨领域结构迁移 研究视角:把 network tomography 的"可加链路指标 + 路径测量 + 可辨识性 + 探测设计"迁移到查询优化的反馈环。评审可能记住的是两点:一是"哪些 join-edge 误差能从子集大小观测中被唯一恢复"这一可辨识性刻画,二是"用 D-optimal 选择要执行或采样的子计划"这一视角。即使数值提升只有个位数百分比,这个框架仍可被引用。前提是可辨识性结果足够扎实,而不只是包装。
This follows the cross-domain structural transfer pattern, transferring network tomography’s “additive link metrics + path measurements + identifiability + probe design” to the query-optimization feedback loop. Reviewers may remember two aspects: an identifiability characterization of which join-edge errors can be uniquely recovered from subset-size observations, and the use of D-optimal design to choose subplans to execute or sample. Even if the numerical improvement is only a single-digit percentage, the framework could still be cited. This requires substantive identifiability results, rather than repackaging alone.
Abstract
运行时反馈通常只能修正已被观测的那个子计划:LEO 式方法存储逐谓词调整因子,Perron 式重优化只使用精确观测到的子集。我们提出 Cardinality Tomography。它假设在原生估计器下,子集 S 的 log 真实基数与 log 估计基数之差,近似等于 S 内各 join edge 与 base filter 的"误差原子" theta、phi 之和。于是每个 (S, true size) 观测都是对潜变量的一行线性测量。我们维护线性高斯后验(recursive ridge / Kalman,带指数遗忘以应对 drift),单次更新代价为 O(|atoms|^2),目标在毫秒内完成。修正后的估计会传播到所有未观测子集,并跨查询复用。后验方差用于两件事:一是不确定性感知的 mid-query 重规划门控,二是用 D-optimal 或预期计划变化准则挑选廉价探测(probe)。核心风险有两个:filter-join 相关性会破坏可加性,且与 LEO、ISOMER 的差异较窄。因此方案把"离线可加性与可辨识性研究"作为第一阶段和 go/no-go 判据,再在 STATS-CEB、JOB/CEB、DSB 及 NeurBench 式 drift 变体上做 PostgreSQL/DuckDB 端到端评估。目前没有任何实验结果,文中的收益均为待验证假设。
Runtime feedback usually corrects only the observed subplan: LEO-style methods store per-predicate adjustment factors, while Perron-style reoptimization uses only exactly observed subsets. We propose Cardinality Tomography. It assumes that, under the native estimator, the difference between log true cardinality and log estimated cardinality for subset S is approximately the sum of error atoms theta and phi for the join edges and base filters in S. Each observation (S, true size) is thus a row of linear measurements of latent variables. We maintain a linear-Gaussian posterior using recursive ridge/Kalman updates, with exponential forgetting for drift. Each update costs O(|atoms|^2), targeting completion within milliseconds. Corrected estimates propagate to all unobserved subsets and are reused across queries. Posterior variance has two uses: uncertainty-aware mid-query replanning gates, and selecting inexpensive probes by D-optimal or expected-plan-change criteria. Two central risks remain: filter–join correlation can violate additivity, and differentiation from LEO and ISOMER is narrow. The first phase and go/no-go criterion is therefore an offline additivity and identifiability study, followed by planned end-to-end PostgreSQL/DuckDB evaluation on STATS-CEB, JOB/CEB, DSB and NeurBench-style drift variants. There are currently no experimental results; all stated gains are hypotheses requiring validation.
Motivation
学习式基数估计在 drift 与未见 workload 下脆弱,重训练昂贵。mid-query 重优化只用精确观测的子集,不跨查询学习,也没有"何时值得切换"的原则性处理。现有反馈机制有三个缺口:(1) 观测不会传播到优化器接下来要考虑的其他子集;(2) 不会选择"观测什么";(3) 不重训练就无法跨查询迁移。在 64 核机器上精确计数很便宜,(subset, true size) 观测流近乎免费。缺的是一种无梯度、无重训练、带不确定性的利用方式。这也符合课题约束:毫秒级开销、不能比原生优化器回退、对 PostgreSQL/DuckDB 侵入小。
Learned cardinality estimation is fragile under drift and unseen workloads, and retraining is expensive. Mid-query reoptimization uses only exactly observed subsets, does not learn across queries, and lacks a principled treatment of “when switching is worthwhile.” Existing feedback mechanisms have three gaps: (1) observations do not propagate to other subsets the optimizer will consider next; (2) they do not choose “what to observe”; (3) they cannot transfer across queries without retraining. Exact counting is inexpensive on a 64-core machine, making the stream of (subset, true size) observations almost free. What is missing is a way to use it without gradients or retraining and with uncertainty. This also matches the project constraints: millisecond overhead, no regression relative to the native optimizer, and minimal changes to PostgreSQL/DuckDB.
The proposed gap in prior work
业内通常把观测基数当作缓存条目(LEO/Perron),或当作学习式残差模型的训练标签。把它看成可加 log 误差模型上的线性测量(network tomography 视角),才会自然提出"哪些原子可辨识""该测哪些子计划"。但要坦白:有经验的专家会预期它在 FK 链上有效,在 filter-join 相关性下失效,所以这个洞见只是中等程度的非显然。它的价值取决于离线实验能否证明可加性在足够多的子集上成立。
The field usually treats observed cardinalities as cache entries, as in LEO/Perron, or as training labels for a learned residual model. Viewing them as linear measurements of an additive log-error model—the network-tomography perspective—naturally raises the questions “which atoms are identifiable?” and “which subplans should be measured?” However, an experienced expert would expect this to work on foreign-key (FK) chains and fail under filter–join correlation, so the insight is only moderately non-obvious. Its value depends on whether offline experiments show additivity holds for enough subsets.
Proposed method
- 误差原子与规范化键:theta_e 以规范化 join predicate pair 为键,phi_f 以 filter predicate signature 为键。在 PostgreSQL/DuckDB 中实现 canonicalization(别名消解、谓词排序、常量分桶)。模型为 log true(S) - log est(S) = sum theta_e + sum phi_f + eps_S。
- 层次化原子扩展(回应 filter-join 相关性质疑):除 edge-only 原子外,加入以 filter 上下文为条件的 join 原子 theta_{e|ctx},并对 edge-only 原子做层次收缩(hierarchical shrinkage)。数据不足时回落到粗粒度原子。
- 在线后验:线性高斯后验(Kalman / recursive ridge),先验方差按原子类型(FK fan-out、M:N 等)取自历史误差分布。每次观测更新代价 O(|atoms in S|^2)。用指数遗忘处理 drift,用 Huber 损失限制非可加相关性的影响。
- 估计器 hook:对任意子集 S',修正估计 = 原生估计 * exp(A_S' * 后验均值),同时给出后验方差。方差过大的原子回落到原生估计。
- 不确定性感知 mid-query 重规划:在 pipeline breaker 处更新后验,用修正后的估计对所有未观测子集重跑 DP。仅当预期收益超过切换成本加不确定性裕度时才切换,以控制回退。
- 测量设计:候选探测包括早停精确 join 计数和样本计数。用贪心 D-optimal 或预期计划变化(value-of-information)准则选择。对选择性强的多路 join,用 correlated/join sample 或早停精确计数代替 1% 均匀样本,并单独量化探测误差与代价。
- 跨查询持久化:原子存于哈希表,带遗忘衰减。提供可辨识性分析工具,即对关联矩阵 A 做秩/条件数分析,报告哪些原子在当前观测集下不可辨识。
- 插件集成:通过 pg_hint_plan 做计划回放,DuckDB 通过其可扩展接口。第一版以离线回放为主,在线 mid-query 切换作为第二阶段。
- Error atoms and canonical keys: key theta_e by a canonical join-predicate pair and phi_f by a filter-predicate signature. Implement canonicalization in PostgreSQL/DuckDB, including alias resolution, predicate ordering and constant bucketing. The model is log true(S) - log est(S) = sum theta_e + sum phi_f + eps_S.
- Hierarchical atom extension, addressing the filter–join-correlation objection: in addition to edge-only atoms, add filter-context-conditioned join atoms theta_{e|ctx}, with hierarchical shrinkage toward edge-only atoms. Fall back to coarser atoms when data is insufficient.
- Online posterior: use a linear-Gaussian posterior, Kalman/recursive ridge, with prior variance by atom type—FK fan-out, M:N and so on—taken from historical error distributions. Each observation costs O(|atoms in S|^2) to update. Use exponential forgetting for drift and Huber loss to limit the effect of non-additive correlations.
- Estimator hook: for any subset S', corrected estimate = native estimate * exp(A_S' * posterior mean), accompanied by posterior variance. Atoms with excessive variance fall back to the native estimate.
- Uncertainty-aware mid-query replanning: update the posterior at a pipeline breaker and rerun dynamic programming (DP) for all unobserved subsets using corrected estimates. Switch only if expected gain exceeds switching cost plus an uncertainty margin, to control regressions.
- Measurement design: candidate probes include early-terminated exact join counts and sample counts. Select them using greedy D-optimal or expected-plan-change/value-of-information criteria. For highly selective multiway joins, replace 1% uniform samples with correlated/join samples or early-terminated exact counts, and quantify probe error and cost separately.
- Cross-query persistence: store atoms in a hash table with forgetting decay. Provide identifiability analysis through rank/condition-number analysis of the incidence matrix A, reporting which atoms are unidentifiable under the current observation set.
- Plugin integration: use pg_hint_plan for plan replay and DuckDB’s extensible interface. The first version emphasizes offline replay; online mid-query switching is the second phase.
Distinction from nearest work
| paper | difference |
|---|---|
| LEO – DB2's LEarning Optimizer (Stillger et al., VLDB 2001) | LEO 从执行计划观测到的基数计算统计/选择性调整,并反馈给未来查询,本质上已是持久化的逐谓词乘性调整因子。红队指出把 LEO 描述成'精确子计划反馈'是不准确的,所以本方案必须把 LEO 忠实实现为基线(含逐谓词因子)。差异只在:对多个 edge/filter 原子做联合加性 log 反问题求解,带后验不确定性,把观测传播到未观测超集与子集,并做探测设计与重规划门控。该差异较窄,需靠消融证明增益来自联合推断而非仅因子复用。 |
| How I Learned to Stop Worrying and Love Re-optimization (Perron et al., 2019) | 该工作用观测到的基数在 mid-query 重新规划剩余部分,只利用精确观测的子集,没有跨查询学习和不确定性建模。本方案把观测传播到未观测子集,并以不确定性门控切换。该文也是端到端评估设置(P-error/延迟)的参照基线。 |
| ISOMER: Consistent Histogram Construction Using Query Feedback (2006) | ISOMER 把查询反馈转化为对未观测部分的修正(最大熵一致性),与'传播到未观测子集'的目标相近。本方案不重建直方图,而是在原生估计器之上学习乘性 log 误差原子,估计器无关;代价是依赖可加性假设。需要把最大熵/一致性方法作为对照基线,证明可加近似在 join 场景下更便宜或更准。 |
| Selectivity Estimation for Linear Queries via Online Learning (2026) | 该文维护与观测反馈一致的数据库可行域并用最大熵预测选择性,在目的和机制上与本方案相近(facet 重叠:purpose/mechanism/domain 均为 similar)。我们只看到摘要级证据,未掌握其全文细节,无法断言差异的大小。本方案的区别是:对原生优化器估计的 log 残差建模、join-edge 原子、探测设计与重规划门控,评估也在端到端 PostgreSQL/DuckDB 计划质量上(evaluation 为 different)。抢发风险真实存在,须尽早精读。 |
| paper | difference |
|---|---|
| LEO – DB2's LEarning Optimizer (Stillger et al., VLDB 2001) | LEO computes statistical/selectivity adjustments from cardinalities observed in execution plans and feeds them into later queries. It already amounts to persistent per-predicate multiplicative adjustment factors. The red team correctly notes that describing LEO as “exact subplan feedback” is inaccurate, so LEO must be implemented faithfully as a baseline, including per-predicate factors. The remaining differences are jointly solving an additive log-error inverse problem over multiple edge/filter atoms, posterior uncertainty, propagation to unobserved supersets and subsets, probe design and replanning gates. This differentiation is narrow; ablations must show gains come from joint inference rather than factor reuse alone. |
| How I Learned to Stop Worrying and Love Re-optimization (Perron et al., 2019) | This work uses observed cardinalities to replan the remaining execution mid-query, using only exactly observed subsets, without cross-query learning or uncertainty modeling. This proposal propagates observations to unobserved subsets and gates switching by uncertainty. The paper also provides a reference baseline for end-to-end evaluation in P-error and latency. |
| ISOMER: Consistent Histogram Construction Using Query Feedback (2006) | ISOMER turns query feedback into corrections for unobserved regions through maximum-entropy consistency, closely matching the goal of “propagation to unobserved subsets.” This proposal does not reconstruct histograms; it learns multiplicative log-error atoms over a native estimator and is estimator-agnostic, at the cost of assuming additivity. Maximum-entropy/consistency methods must be included as baselines to establish that the additive approximation is cheaper or more accurate in join settings. |
| Selectivity Estimation for Linear Queries via Online Learning (2026) | This paper maintains a feasible database region consistent with observed feedback and predicts selectivity through maximum entropy, making its purpose and mechanism close to this proposal: purpose/mechanism/domain facets are all similar. Only abstract-level evidence is available, so the full-text details and size of the distinction cannot be asserted. Proposed differences are modeling log residuals of native optimizer estimates, join-edge atoms, probe design and replanning gates, with end-to-end PostgreSQL/DuckDB plan-quality evaluation (evaluation facet different). The risk of being scooped is real; careful reading should happen early. |
Planned experiments
单机 64 核 CPU(无需 GPU)。在 PostgreSQL 上用 pg_hint_plan 做计划回放,DuckDB 作第二引擎。构造查询流:模板化流、非模板化/ad hoc 流(CEB 随机模板、DSB 变参)、以及带 NeurBench 式 insert/delete 的 drift 流。先做离线可加性研究(第一阶段 go/no-go),再做在线模拟,最后做端到端延迟评估。每个配置重复运行并报告方差,按查询统计回退数。
- datasets: STATS-CEB; JOB / CEB (IMDB); DSB; STATS-CEB 的 drift 变体(NeurBench 式 insert/delete)
- baselines: 原生 PostgreSQL 与 DuckDB 估计; 忠实实现的 LEO(逐谓词调整因子,含持久化); 精确子计划缓存 + Perron 式 re-optimization; ISOMER/最大熵一致性选择性基线; FactorJoin 与 NeuroCard(drift 后微调); 基于已观测基数的梯度提升残差模型; 悲观界 LpBound
- metrics: 未观测子集的 P-error 与 Q-error; drift 查询流上的端到端延迟 P50/P90/P99; 每次观测的更新时间; 相对原生优化器的回退(regression)数; 后验校准(覆盖率); 对数误差的 held-out 解释方差 R^2; 探测代价与探测误差(单独报告)
- ablations: edge-only vs edge+filter vs edge×filter-context 层次化原子 vs LEO 逐谓词因子; 传播(联合推断)vs 仅逐原子因子复用,用于区分增益来源; 有/无不确定性感知切换; 贪心 D-optimal 探测 vs 随机探测; 遗忘率; Huber vs 平方损失; 探测类型:1% 均匀样本 vs join sample vs 早停精确计数; 基础估计器强度:原生 PG vs 修正后的 PG vs FactorJoin
- expected: 这些是假设而非已有结果:在模板化 drift 流上,drift 事件后约 10 个查询内,未观测子集的 P-error 相对精确子计划缓存降低 1.5x 到 2x;端到端延迟较精确子计划反馈降低 20-30%(该数字出自模板化流,会偏有利,在 ad hoc 流上预计显著缩小甚至为零);更新代价低于 1 ms;无 GPU 下与微调后的 FactorJoin 相当。预期收益主要出现在 FK 链型 join,在强 filter-join 相关的查询上提升有限。强基础估计器下增益预计收缩。
- 否证条件: 满足任一条即停止或转向:(1) 在 JOB / STATS-CEB 上,对未观测子集的 log 误差 held-out 解释方差 R^2 低于 0.5,或未超过 LEO 逐谓词因子基线;(2) 即使采用 edge×filter-context 层次化原子,仍无明显提升;(3) 相对精确子计划缓存 + LEO 重优化没有端到端增益;(4) 在非模板化流上原子复用率过低、跨查询收益为零且单查询内传播也无收益。
Use a single 64-core CPU machine, without a GPU. Replay PostgreSQL plans through pg_hint_plan and use DuckDB as the second engine. Construct templated streams, non-templated/ad hoc streams—CEB random templates and DSB with varied parameters—and drift streams with NeurBench-style inserts/deletes. First conduct an offline additivity study as the Phase 1 go/no-go, then online simulation, and finally end-to-end latency evaluation. Repeat each configuration, report variance and count regressions per query.
- datasets: STATS-CEB; JOB/CEB (IMDB); DSB; drift variants of STATS-CEB with NeurBench-style inserts/deletes.
- baselines: Native PostgreSQL and DuckDB estimates; faithfully implemented LEO with persistent per-predicate adjustment factors; exact-subplan cache + Perron-style reoptimization; ISOMER/maximum-entropy consistent-selectivity baseline; FactorJoin and NeuroCard fine-tuned after drift; a gradient-boosted residual model using observed cardinalities; pessimistic bounds from LpBound.
- metrics: P-error and Q-error on unobserved subsets; end-to-end P50/P90/P99 latency on drifting query streams; update time per observation; regressions relative to the native optimizer; posterior calibration/coverage; held-out explained variance R^2 of log-error; probe cost and probe error, reported separately.
- ablations: Edge-only vs. edge+filter vs. edge×filter-context hierarchical atoms vs. LEO per-predicate factors; propagation/joint inference vs. per-atom factor reuse alone, separating gain sources; with/without uncertainty-aware switching; greedy D-optimal vs. random probing; forgetting rate; Huber vs. squared loss; probe types: 1% uniform sample vs. join sample vs. early-terminated exact count; base-estimator strength: native PG vs. corrected PG vs. FactorJoin.
- expected: Hypotheses, not existing results: on templated drift streams, within approximately 10 queries after a drift event, unobserved-subset P-error is 1.5x to 2x lower than with an exact-subplan cache; end-to-end latency is 20–30% lower than with exact-subplan feedback. That number comes from the proposed templated-stream setting, which is favorable to the method; gains on ad hoc streams are expected to shrink considerably or disappear. Target update cost is below 1 ms, and performance without a GPU is expected to match fine-tuned FactorJoin. Gains are expected mainly on FK-chain joins, with limited improvements under strong filter–join correlation. A stronger base estimator is expected to reduce the gains.
- Falsification criteria: Stop or redirect if any criterion holds: (1) on JOB/STATS-CEB, held-out explained variance R^2 of log-error on unobserved subsets is below 0.5 or does not exceed LEO’s per-predicate-factor baseline; (2) even edge×filter-context hierarchical atoms produce no clear improvement; (3) there is no end-to-end gain over exact-subplan caching + LEO reoptimization; (4) atom reuse is too low on non-templated streams, cross-query gain is zero and within-query propagation also yields no benefit.
Two-week pilot plan
- 第 1-3 天:对 100 条 STATS-CEB/JOB 查询,取所有连通子集的真实基数(尽量复用现有 ground truth,否则在 64 核上离线计算,预计 1-2 天),同时导出 PostgreSQL 对应子集的原生估计。
- 第 3-4 天:实现原子规范化(join pair、filter signature)并构造关联矩阵 A,输出原子覆盖统计、复用率,以及 A 的秩/条件数(可辨识性初判)。
- 第 4-7 天:用 ridge 回归拟合加性模型,度量对未观测子集和共享原子的新查询的 held-out R^2。同时拟合 edge×filter-context 层次化变体和 LEO 逐谓词因子基线,做三者对比。这是 go/no-go 点。
- 第 7-10 天:模拟在线到达(含合成 drift),与精确子计划缓存比较 P-error,先用 Kalman 递推实现并测量单次更新耗时。
- 第 10-12 天:把修正后的估计经 pg_hint_plan 做计划回放,在选定的子集查询上测延迟与回退,初步考察对 P-error 的转化程度。
- 第 12-14 天:汇总结果,依据 kill_criterion 决定继续、转向(例如把重点移到可辨识性/测量设计)或停止;同时精读 2026 online linear-selectivity 论文,更新差异化表述。
- Days 1–3: obtain true cardinalities for every connected subset of 100 STATS-CEB/JOB queries. Reuse existing ground truth where possible; otherwise compute it offline on 64 cores, expected to take 1–2 days. Also export PostgreSQL’s native estimates for the corresponding subsets.
- Days 3–4: implement atom canonicalization, using join pairs and filter signatures, and construct incidence matrix A. Report atom coverage, reuse rates and A’s rank/condition number as an initial identifiability assessment.
- Days 4–7: fit the additive model by ridge regression and measure held-out R^2 on unobserved subsets and new queries sharing atoms. Also fit the edge×filter-context hierarchical variant and LEO’s per-predicate-factor baseline, comparing all three. This is the go/no-go point.
- Days 7–10: simulate online arrivals, including synthetic drift, and compare P-error against exact-subplan caching. First implement Kalman recursion and measure time per update.
- Days 10–12: replay plans through pg_hint_plan using corrected estimates. Measure latency and regressions on selected subset queries, initially assessing how P-error improvements translate into execution gains.
- Days 12–14: summarize results and use kill_criterion to decide whether to continue, redirect—for example toward identifiability/measurement design—or stop. Also read the 2026 online linear-selectivity paper carefully and update the differentiation claims.
Risks and responses
- filter-join 相关性使 log 误差非可加,原子不能独立于共现 filter 定义(红队认为这是 JOB/STATS 的主要误差来源) → 第一阶段即用离线回归量化;引入 edge×filter-context 层次化原子与收缩;Huber 只作兜底,不作为主要解决手段;若 R^2 不达标则按 kill_criterion 停止。
- 与 LEO、ISOMER 及 2026 online linear-selectivity 工作差异过窄,被视为增量 → 忠实实现 LEO 与最大熵基线;把可辨识性理论与测量设计作为主要贡献;用消融分离'传播'、'探测设计'、'不确定性门控'各自的贡献;尽早精读 2026 论文。
- ad hoc 工作负载中原子复用少,跨查询收益消失;模板化 drift 流是有利设置,有'设定被构造来偏袒方法'之嫌 → 同时报告非模板化流结果;把单查询内的传播收益(mid-query)与跨查询收益分开报告;诚实报告收益边界。
- 1% 均匀样本在选择性强的多路 join 上不可靠,探测误差污染后验 → 改用 join/correlated sample 或早停精确计数;把探测噪声作为观测噪声方差建模;单独量化探测误差与代价。
- 复杂谓词(LIKE、OR、表达式)的规范化键难以设计,覆盖率低 → 先限定为等值/范围谓词与 FK join;无法规范化的谓词回落到原生估计;统计覆盖率并在论文中报告。
- 强基础估计器下残差结构更弱,增益缩小;延迟测量噪声大且被少数查询主导 → 在多种基础估计器上做消融;重复运行并报告按查询的回退数与置信区间;以 P-error 作为更稳定的主指标之一。
- Filter–join correlation makes log-error non-additive; atoms cannot be defined independently of co-occurring filters. The red team considers this the main error source on JOB/STATS. → Quantify this in Phase 1 by offline regression. Introduce edge×filter-context hierarchical atoms and shrinkage. Use Huber only as a fallback, not the primary solution. Stop under kill_criterion if R^2 misses the threshold.
- Differentiation from LEO, ISOMER and the 2026 online linear-selectivity work is too narrow, making the work incremental. → Implement LEO and maximum-entropy baselines faithfully; make identifiability theory and measurement design the main contributions; use ablations to separate propagation, probe design and uncertainty gating; read the 2026 paper early.
- Atoms are seldom reused on ad hoc workloads, eliminating cross-query gain; templated drift streams are favorable and may look constructed to favor the method. → Report non-templated streams too. Separate within-query propagation gains, including mid-query gains, from cross-query gains and report the method’s boundaries accurately.
- 1% uniform samples are unreliable for highly selective multiway joins, contaminating the posterior with probe error. → Use join/correlated samples or early-terminated exact counts. Model probe noise as observation-noise variance and quantify probe error and cost separately.
- Canonical keys are difficult for complex predicates such as LIKE, OR and expressions, leading to low coverage. → Initially restrict the scope to equality/range predicates and FK joins. Fall back to native estimates for predicates that cannot be canonicalized; measure and report coverage.
- Residual structure is weaker with strong base estimators, reducing gains; latency noise is high and a few queries dominate. → Ablate across several base estimators. Repeat runs and report per-query regression counts and confidence intervals. Use P-error as one of the more stable primary metrics.
Reviewer questions and responses
- Q: LEO 已经把观测基数转成逐谓词乘性调整因子(含局部与 join 谓词),存于持久目录并被后续查询复用,这就是'可复用误差原子'。把 LEO 描述成'精确子计划反馈'是不公平的基线。 A: 这条异议基本成立,必须接受:我们会把 LEO 按其论文忠实实现(含逐谓词调整因子)作为主要基线,并去掉'LEO=精确子计划缓存'的说法。区别只剩下联合加性推断(能把一个多边子集的观测拆分归因到多个原子并传播到未观测子集)、后验不确定性、探测设计与重规划门控。这些是否带来实质增益是实证问题,'传播 vs 仅因子复用'的消融就是为此设计;若增益不显著,论文重心要转为可辨识性分析,或直接放弃。
- Q: theta_e 只以 join 谓词对为键并跨 filter 组合共享,但 PostgreSQL 在 JOB、STATS-CEB、DSB 上的主要误差来自 filter-join 相关性,会使 theta_e 依赖共现的 filter。 A: 这是核心风险,我们不回避。应对分三步:先做离线回归,直接测量 edge-only 原子能解释多少方差;再引入 edge×filter-context 的层次化原子;Huber 只用于处理少量异常,并不能修复系统性偏差。若层次化后 R^2 仍低于 0.5,按 kill_criterion 停止。我们没有证据表明可加性在这些基准上成立,这需要实验来回答。
- Q: 1% 样本探测对选择性强的多路 join 不可靠,而模板化流上的头条对比偏向本方法,也没检验泛化。 A: 同意。探测将改用 join sample 或早停精确计数,并把探测误差作为观测噪声纳入后验,探测误差与代价单独报告。评估增加非模板化/ad hoc 流(CEB 随机模板、DSB 变参),并把 20-30% 的数字明确限定为模板化 drift 流上的假设值;若 ad hoc 流上无增益,会如实报告其适用边界。
- Q: 增益来源不明:是 LEO 式因子复用,还是 Kalman 与测量设计? A: 设计了分解消融:仅因子复用、+联合传播、+不确定性门控、+D-optimal 探测逐级叠加,并与 Perron 式重优化、ISOMER/最大熵基线在同等调参和算力下对比。如果大部分增益来自第一级,则论文定位要相应收缩。
- Q: 与 2026 年 Selectivity Estimation for Linear Queries via Online Learning 重叠,且存在抢发风险。 A: 我们目前只有摘要级证据,无法断言差异大小。计划在第一周精读并写出明确的差异表(估计对象、原生估计器残差 vs 数据库可行域、端到端优化评估、探测设计)。抢发风险确实存在,应通过尽快完成可辨识性与离线研究来降低,若发现实质重叠则重新定位。
- Q: LEO already turns observed cardinalities into per-predicate multiplicative adjustment factors, including local and join predicates, stores them in a persistent catalog and reuses them in later queries. These are “reusable error atoms.” Describing LEO as “exact subplan feedback” creates an unfair baseline. A: This objection is substantially correct and must be accepted. We will implement LEO faithfully from its paper, including per-predicate adjustment factors, as a main baseline and remove the claim “LEO = exact-subplan cache.” The remaining distinctions are joint additive inference—which can attribute a multi-edge subset observation to multiple atoms and propagate to unobserved subsets—posterior uncertainty, probe design and replanning gates. Whether these produce meaningful gains is an empirical question; the “propagation vs. factor reuse alone” ablation is designed to answer it. If gains are insignificant, the paper must shift toward identifiability analysis or be abandoned.
- Q: theta_e is keyed only by join-predicate pairs and shared across filter combinations, but the main PostgreSQL estimation errors on JOB, STATS-CEB and DSB arise from filter–join correlation, making theta_e depend on co-occurring filters. A: This is the central risk. The response has three steps: first measure by offline regression how much variance edge-only atoms explain; then introduce edge×filter-context hierarchical atoms; use Huber only for occasional outliers, since it cannot fix systematic bias. If R^2 remains below 0.5 after the hierarchical extension, stop under kill_criterion. There is no evidence yet that additivity holds on these benchmarks; experiments must answer that.
- Q: 1% sample probes are unreliable for highly selective multiway joins. The headline templated-stream comparison favors this method and does not test generalization. A: Agreed. Probes will use join samples or early-terminated exact counts, with probe error included as observation noise in the posterior and error/cost reported separately. Add non-templated/ad hoc streams—CEB random templates and DSB with varied parameters—and explicitly restrict the 20–30% figure to a hypothesis for templated drift streams. If ad hoc streams show no gain, report that boundary.
- Q: The source of the gains is unclear: LEO-style factor reuse, or Kalman updates and measurement design? A: Use a decomposition ablation: factor reuse alone, then add joint propagation, uncertainty gating and D-optimal probes incrementally. Compare with Perron-style reoptimization and ISOMER/maximum-entropy baselines under equal tuning and compute budgets. If most gains come from the first level, narrow the paper’s positioning accordingly.
- Q: The work overlaps with Selectivity Estimation for Linear Queries via Online Learning (2026), and risks being scooped. A: Only abstract-level evidence is available, so we cannot assert the extent of differentiation. In the first week, read it carefully and produce a distinction table covering the estimation target, native-estimator residuals vs. a feasible database region, end-to-end optimization evaluation and probe design. The risk of being scooped is real; completing identifiability and offline studies quickly may reduce it. Reposition if substantial overlap is found.
Conference fit
适合 VLDB / SIGMOD 的优化器与基数估计方向,前提是交付可工作的端到端系统(PostgreSQL + DuckDB)、忠实实现的强基线(LEO、ISOMER、Perron)、以及扎实的可辨识性/可加性分析。若只是 LEO 的变体而没有明确的理论或经验差异化,则偏向增量,容易被拒;此时可考虑缩小为分析型或 short paper。当前评审评分为 borderline(differentiation 2、realism 2,feasibility 4、venue_fit 4)。
Suitable for optimizer and cardinality-estimation research at VLDB/SIGMOD, provided it delivers a working end-to-end PostgreSQL + DuckDB system, faithfully implemented strong baselines—LEO, ISOMER and Perron—and substantive identifiability/additivity analysis. If it is merely a LEO variant without clear theoretical or empirical differentiation, it is incremental and likely to be rejected; an analysis paper or short paper may be more appropriate. The current internal assessment is borderline: differentiation 2, realism 2, feasibility 4 and venue_fit 4.