Since its inception, database research has given limited attention to optimizing predicates with disjunctions. For conjunctions, there there exists a "rule-of-thumb" of evaluating predicates in increasing selectivity to minimize unnecessary predicate evaluations. However, for disjunctions, no such rule-of-thumb exists. Furthermore, what little past work there is, has mostly focused on optimizations for traditional row-oriented databases. A key difference in predicate evaluation for row stores and column stores is that while row stores apply predicates to a single record at a time, column stores apply predicates to sets of records. Not only must the execution engine decide the order in which to apply the predicates, but it must also decide how to combine these sets to minimize the total number of records these predicates are applied to. Our goal for this work is to provide a good "rule-of-thumb" algorithm for queries with both conjunctions and disjunctions in a column store setting. We present EvalPred, the first polynomial-time (i.e., O(n log n)) predicate evaluation algorithm with provably optimal guarantees for all predicate expressions of nested depth 2 or less. EvalPred's optimality is guaranteed under a wide range of cost models, representing different real-world scenarios, as long as the cost model follows a "triangle-inequality"-like property. Yet, despite its powerful guarantees, EvalPred is almost trivially simple and should be easy to implement, even in existing systems. Even for predicate expressions of depth 3 or greater, we show via experimentation that EvalPred comes quite close to optimal with 92% of queries within 5% of optimal. Furthermore, compared to other algorithms, EvalPred achieves average speedups of 2.6x over no disjunction optimization, 1.4x over a greedy algorithm, and 28x over the state-of-the-art for the top 10% of queries.
翻译:自建立以来,数据库研究对优化顶部与脱节作用的优化关注有限。对于交界而言,存在一种“平流规则 ”, 即用增加选择性来评价顶部的顺序, 以尽量减少不必要的顶部评价。 但是, 对于脱节, 没有这样的顶部规则存在。 此外, 过去很少的工作大多侧重于优化传统的以行为导向的数据库。 对行商店和柱部商店的顶部评价中的一个关键区别是, 当行商店一次将底部涂在单一记录中时, 柱层仓库会将底部涂成顶部的底部。 不仅执行引擎必须决定几乎要应用顶部的顺序, 而且它还必须决定如何合并这些套件以尽量减少这些顶部记录的总数。 我们这项工作的目标是提供良好的“ 平流规则” 算法, 用于连接和分行数据库的顶部。 我们展示的是EvalpealPrevelopment, 第一个多部的顶部评估算法, 其顶部的顶部直位值和直位直位的直径直径直径直到直径直径直径方的直径直的直的直方值, 。