paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DBRepro: Automated Database Synthesis via a Hybrid Constraint-Solving Approach for Reproducing Slow Queries

DBRepro:通过混合约束求解方法自动合成数据库以复现慢查询
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026匹配度 1/10 · 该论文属于数据库慢查询复现与数据合成方向,核心是约束求解与数据库分布保真,不涉及用户关注的 PL/AI 交叉、静态分析、LLM/Agent 或浮点/贝叶斯程序分析。虽然使用了约束求解并有工程与工业验证,但与研究画像的核心问题几乎没有直接交集。引用 0 inbox
Zhaoyang Zhang, Shuang Liu, Dengfeng Xu, Wei Lu, Jianquan Leng, Sheng Du, Xiaoyong Du
crossref: 2026-10-09

AI 速览

一句话:提出DBRepro,用混合约束求解自动合成代理数据库,严格满足局部基数约束并保留全局分布,以复现慢查询执行计划。

数据隐私限制使慢查询只能离线诊断,而从非侵入元数据合成能诱导相同物理执行计划的代理数据库至关重要。现有数据驱动方法无法强制精确局部基数,工作负载感知方法又严重扭曲全局分布。DBRepro将数据库生成建模为约束分布合成:由轻量列统计初始化全局分布,从目标查询提取执行约束,并渐进调整分布以严格满足局部基数约束,同时最大程度保留全局分布。在TPC-H与SSB上,相比数据驱动基线基数误差最多降低20.3%且计划一致;相比工作负载感知基线多复现15%一致计划,延迟比例误差降低21.5%。并在KingbaseES管理的近1 TB真实工业数据集上验证实用性。

问题
在无法访问原始用户数据时,如何从非侵入元数据合成代理数据库,使查询优化器产生与生产环境相同的物理执行计划,从而离线复现和诊断慢查询。
方法
将数据库生成形式化为约束分布合成问题,融合数据驱动与工作负载感知:用轻量列统计初始化全局分布,从目标查询提取执行约束,并渐进调整分布以同时满足精确局部基数与全局统计分布。
评估
在TPC-H和SSB基准上与最新基线比较保真度指标,并在KingbaseES管理的近1 TB工业数据集上验证慢查询执行性能复现。
原文摘要(Abstract)

Slow queries frequently cause severe performance bottlenecks in Database Management Systems (DBMSs). Due to the severe risk of exacerbating online resource contention, diagnosing their root causes online is usually infeasible; offline diagnosis has thus become the de facto approach. However, strict data privacy regulations prohibit accessing original user data. Therefore, synthesizing a proxy database, one that induces the query optimizer to generate identical physical execution plans as in production, from non-intrusive metadata, is critical for reproducing and diagnosing slow queries offline. Achieving high-fidelity reproduction demands satisfying both global statistical distributions and exact local cardinality constraints. Existing works fundamentally fail to achieve both simultaneously: data-driven approaches cannot enforce strict local cardinalities, whereas workload-aware approaches severely distort the overall data distribution, misleading the optimizer into divergent execution plans. To bridge this gap, we introduce DBRepro, an automated end-to-end database synthesis framework that synergistically integrates data-driven and workload-aware methodologies. DBRepro formulates database generation as a constrained distribution synthesis problem. It initializes a global data distribution from lightweight column statistics, extracts execution constraints from the target queries, and progressively adjusts the distribution to satisfy these constraints, ensuring the global distribution is maximally preserved while exact local cardinalities are strictly enforced. Extensive evaluations on the TPC-H and SSB benchmarks demonstrate that DBRepro outperforms state-of-the-art baselines across comprehensive fidelity metrics. Compared to the data-driven baseline, it reduces cardinality error by up to 20.3% while maintaining identical plan consistency. Against a workload-aware baseline, it reproduces 15% more consistent execution plans and lowers the latency proportion error by 21.5%. Furthermore, we validate its industrial practicality on a nearly 1 TB real-world dataset from a specific industrial sector, managed by KingbaseES, successfully reproducing the execution performance of complex slow queries with high fidelity.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot12230,
  title = {DBRepro: Automated Database Synthesis via a Hybrid Constraint-Solving Approach for Reproducing Slow Queries},
  author = {Zhaoyang Zhang and Shuang Liu and Dengfeng Xu and Wei Lu and Jianquan Leng and Sheng Du and Xiaoyong Du},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834463}
}