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

再论大数据管理系统中的动态连接优化

Revisiting Runtime Dynamic Optimization for Join Queries in Big Data Management Systems

Christina Pavlopoulou, Michael J. Carey, Vassilis J. Tsotras

摘要:

查询优化对于大型数据管理系统来说仍然是一个悬而未决的问题。传统的优化器是基于成本的,并使用中间结果基数的统计估计来分配成本并选择最佳方案。然而,这样的估计往往会变得不太准确,因为过滤条件所造成的未检测到的相关性多个谓词本地到一个单一的数据集,谓词与查询参数,或谓词涉及用户定义的功能(UDF)。因此,传统的查询优化器往往会忽略或错误计算这些设置,从而导致次优的执行计划。考虑到当今的数据量,次优计划很快就会变得非常低效。在这项工作中,我们重新审视了运行时动态优化的旧思想,并将其应用于一个无共享的分布式数据库系统AsterixDB。优化分阶段运行(重新优化点),首先执行单个数据集本地的所有谓词。从每个阶段创建的中间结果用于重新优化剩余的查询。这种重新优化方法避免了不准确的中间结果基数估计,从而导致更好的执行计划。虽然它引入了实现这些中间结果的开销,但我们的实验表明,这种开销相对较小,并且考虑到优化的好处,这是可以接受的代价。事实上,我们的实验评估表明,与当前默认的AsterixDB计划以及基于静态成本的优化(即基于初始数据集统计数据)和其他最先进的方法相比,运行时动态优化可以产生更好的执行计划。

英文摘要:

Query Optimization remains an open problem for Big Data Management Systems. Traditional optimizers are cost-based and use statistical estimates of intermediate result cardinalities to assign costs and pick the best plan. However, such estimates tend to become less accurate because of filtering conditions caused either from undetected correlations between multiple predicates local to a single dataset, predicates with query parameters, or predicates involving user-defined functions (UDFs). Consequently, traditional query optimizers tend to ignore or miscalculate those settings, thus leading to suboptimal execution plans. Given the volume of today's data, a suboptimal plan can quickly become very inefficient. In this work, we revisit the old idea of runtime dynamic optimization and adapt it to a shared-nothing distributed database system, AsterixDB. The optimization runs in stages (re-optimization points), starting by first executing all predicates local to a single dataset. The intermediate result created from each stage is used to re-optimize the remaining query. This re-optimization approach avoids inaccurate intermediate result cardinality estimations, thus leading to much better execution plans. While it introduces the overhead for materializing these intermediate results, our experiments show that this overhead is relatively small and it is an acceptable price to pay given the optimization benefits. In fact, our experimental evaluation shows that runtime dynamic optimization leads to much better execution plans as compared to the current default AsterixDB plans as well as to plans produced by static cost-based optimization (i.e. based on the initial dataset statistics) and other state-of-the-art approaches.

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

↑