arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1208.0278cs.DB
收藏

基于统计技术的SQL系统资源消耗稳健估计

Robust Estimation of Resource Consumption for SQL Queries using Statistical Techniques

Jiexing Li, Arnd Christian König, Vivek Narasayya, Surajit Chaudhuri

摘要:

估计SQL查询的资源消耗的能力对于数据库系统中的许多任务(诸如查询优化期间的准入控制、查询调度和成本计算)是至关重要的。最近的工作已经探索了使用统计技术进行资源估计,以代替在查询优化中使用的手动构建的成本模型。这种技术需要查询中资源使用的训练数据示例,提供了优越的估计精度的承诺,因为它们可以考虑诸如系统的硬件特性或基数估计中的偏差之类的因素。然而,所提出的方法缺乏鲁棒性,因为它们不能很好地推广到不同于训练样本的查询,从而导致显著的估计误差。我们的方法旨在通过将数据库查询处理知识与统计模型相结合来解决这个问题。我们在单个运营商的层面上对资源使用进行建模,每个运营商类型具有不同的模型和功能,并明确地对每个运营商的渐近行为进行建模。这导致显著更好的估计精度和估计任意计划的资源使用的能力,即使它们与训练实例非常不同。我们使用Microsoft SQL Server上的各种大规模现实生活和基准工作负载来验证我们的方法。

英文摘要:

The ability to estimate resource consumption of SQL queries is crucial for a number of tasks in a database system such as admission control, query scheduling and costing during query optimization. Recent work has explored the use of statistical techniques for resource estimation in place of the manually constructed cost models used in query optimization. Such techniques, which require as training data examples of resource usage in queries, offer the promise of superior estimation accuracy since they can account for factors such as hardware characteristics of the system or bias in cardinality estimates. However, the proposed approaches lack robustness in that they do not generalize well to queries that are different from the training examples, resulting in significant estimation errors. Our approach aims to address this problem by combining knowledge of database query processing with statistical models. We model resource-usage at the level of individual operators, with different models and features for each operator type, and explicitly model the asymptotic behavior of each operator. This results in significantly better estimation accuracy and the ability to estimate resource usage of arbitrary plans, even when they are very different from the training instances. We validate our approach using various large scale real-life and benchmark workloads on Microsoft SQL Server.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑