ResQ: 实际性能感知查询生成
ResQ: Realistic Performance-Aware Query Generation
AI总结:
ResQ通过细粒度工作负载合成系统生成可执行SQL工作负载,有效匹配生产跟踪的执行目标和操作符分布,实现高保真度和效率。
摘要:
数据库研究和开发严重依赖于现实用户工作负载进行基准测试、实例优化、迁移测试和数据库调优。然而,由于严格的隐私法规,获取真实世界的SQL查询极具挑战性。尽管云数据库供应商已经开始向研究社区释放匿名化性能跟踪,但这些跟踪通常只提供高层次的执行统计信息,而没有原始查询文本或数据,这在需要实际执行的场景中是不够的。现有工具无法捕捉细粒度的性能模式或生成可运行的工作负载,以重现这些公开跟踪,同时具有高保真度和效率。为了弥合这一差距,我们提出了ResQ,一个细粒度的工作负载合成系统,旨在生成可执行的SQL工作负载,以忠实匹配生产跟踪的每查询执行目标和操作符分布。ResQ构建执行感知的查询图,通过贝叶斯优化驱动的谓词搜索将其实例化为SQL,并通过在精确查询和参数化模板层次上重用来显式建模工作负载重复。为了确保实用的可扩展性,ResQ结合搜索空间边界与轻量级本地成本模型以加速优化。在公开云跟踪(Snowset、Redset)和一个新发布的工业跟踪(Bendset)上的实验表明,ResQ显著优于最先进的基线,实现了96.71%的标记节省和86.97%的运行时间减少,同时在CPU时间上将最大Q误差降低14.8倍,在扫描字节上降低997.7倍,并接近操作符组成。
英文摘要:
Database research and development rely heavily on realistic user workloads for benchmarking, instance optimization, migration testing, and database tuning. However, acquiring real-world SQL queries is notoriously challenging due to strict privacy regulations. While cloud database vendors have begun releasing anonymized performance traces to the research community, these traces typi- cally provide only high-level execution statistics without the origi- nal query text or data, which is insufficient for scenarios that require actual execution. Existing tools fail to capture fine-grained perfor- mance patterns or generate runnable workloads that reproduce these public traces with both high fidelity and efficiency. To bridge this gap, we propose ResQ, a fine-grained workload synthesis sys- tem designed to generate executable SQL workloads that faithfully match the per-query execution targets and operator distributions of production traces. ResQ constructs execution-aware query graphs, instantiates them into SQL via Bayesian Optimization-driven pred- icate search, and explicitly models workload repetition through reuse at both exact-query and parameterized-template levels. To ensure practical scalability, ResQ combines search-space bounding with lightweight local cost models to accelerate optimization. Ex- periments on public cloud traces (Snowset, Redset) and a newly released industrial trace (Bendset) demonstrate that ResQ signif- icantly outperforms state-of-the-art baselines, achieving 96.71% token savings and a 86.97% reduction in runtime, while lowering maximum Q-error by 14.8x on CPU time and 997.7x on scanned bytes, and closely matching operator composition.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。