论文标题

BITVECTOR-INAVEARAING查询优化针对决策支持查询(扩展版本)

Bitvector-aware Query Optimization for Decision Support Queries (extended version)

论文作者

Ding, Bailu, Chaudhuri, Surajit, Narasayya, Vivek

论文摘要

BitVector过滤是一种重要的查询处理技术,可以大大降低执行成本,尤其是对于具有多个加入的复杂决策支持查询。但是,尽管它的应用很广,但对查询优化的影响尚未得到很好的理解。 在这项工作中,我们研究了BitVector过滤器如何影响查询优化。我们表明,将BITVECTOR过滤器直接纳入查询优化可以通过查询中关系数量的指数因素来增加计划空间的复杂性。我们使用BitVector过滤器分析了计划,以在没有跨产品的右深树计划空间中进行恒星和雪花查询。令人惊讶的是,通过一些简化的假设,我们证明,可以从查询中的关系数中的线性计划中找到最低成本的计划。这大大降低了此类查询的计划空间复杂性,从指数为线性。 在我们的分析中,我们提出了一种算法,该算法解释了BitVector过滤器在查询优化中的影响。我们的算法通过在查询中的关系数中从线性数量的候选计划中选择任意决策支持查询的加入顺序。我们在Microsoft SQL Server中实现算法作为转换规则。我们对行业标准基准和客户工作量的评估表明,与原始的Microsoft SQL Server相比,我们的技术将总CPU执行时间降低了22%-64%的工作负载,最多减少了两个数量级的CPU执行时间。

Bitvector filtering is an important query processing technique that can significantly reduce the cost of execution, especially for complex decision support queries with multiple joins. Despite its wide application, however, its implication to query optimization is not well understood. In this work, we study how bitvector filters impact query optimization. We show that incorporating bitvector filters into query optimization straightforwardly can increase the plan space complexity by an exponential factor in the number of relations in the query. We analyze the plans with bitvector filters for star and snowflake queries in the plan space of right deep trees without cross products. Surprisingly, with some simplifying assumptions, we prove that, the plan of the minimal cost with bitvector filters can be found from a linear number of plans in the number of relations in the query. This greatly reduces the plan space complexity for such queries from exponential to linear. Motivated by our analysis, we propose an algorithm that accounts for the impact of bitvector filters in query optimization. Our algorithm optimizes the join order for an arbitrary decision support query by choosing from a linear number of candidate plans in the number of relations in the query. We implement our algorithm in Microsoft SQL Server as a transformation rule. Our evaluation on both industry standard benchmarks and customer workload shows that, compared with the original Microsoft SQL Server, our technique reduces the total CPU execution time by 22%-64% for the workloads, with up to two orders of magnitude reduction in CPU execution time for individual queries.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源