arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2404.09109cs.DB
收藏

使用标记执行优化析取查询

Optimizing Disjunctive Queries with Tagged Execution

Albert Kim, Samuel Madden

AI总结:

针对析取谓词查询优化存在的冗余执行问题,提出标记执行机制按满足的谓词对元组分组并标记以消除冗余,并引入标记泛化技术控制开销,在 Basilisk 系统中实现最高达19倍加速。

摘要:

尽管对查询优化进行了数十年的研究,但优化带有析取谓词表达式的查询仍然是一个挑战。现有系统采用的解决方案(如果有的话)通常过于简单,并导致执行引擎执行大量冗余工作。为了解决这些问题,我们提出了一种称为标记执行的新型查询执行方式。标记执行根据查询中的元组满足(或不满足)哪些谓词,将它们分组到子关系中,并用该信息对它们进行标记。然后,这些标记为查询操作符在运行时利用提供了额外的上下文,使它们能够消除传统引擎执行的大量冗余工作,并实现析取谓词的谓词下推优化。然而,标记执行本身也带来了挑战,创建什么标记的问题并非微不足道。粗心地创建标记可能导致标记空间呈指数级爆炸,其开销将超过带来的收益。为了解决这个问题,我们提出了一种称为标记泛化的技术,以最小化标记空间。我们在系统 Basilisk 中实现了带有标记泛化的标记执行模型,我们的评估表明,与传统执行模型相比,平均运行时间加速了 2.7 倍,在某些情况下加速高达 19 倍。

英文摘要:

Despite decades of research into query optimization, optimizing queries with disjunctive predicate expressions remains a challenge. Solutions employed by existing systems (if any) are often simplistic and lead to much redundant work being performed by the execution engine. To address these problems, we propose a novel form of query execution called tagged execution. Tagged execution groups tuples into subrelations based on which predicates in the query they satisfy (or don't satisfy) and tags them with that information. These tags then provide additional context for query operators to take advantage of during runtime, allowing them to eliminate much of the redundant work performed by traditional engines and realize predicate pushdown optimizations for disjunctive predicates. However, tagged execution brings its own challenges, and the question of what tags to create is a nontrivial one. Careless creation of tags can lead to an exponential blowup in the tag space, with the overhead outweighing the benefits. To address this issue, we present a technique called tag generalization to minimize the space of tags. We implemented the tagged execution model with tag generalization in our system Basilisk, and our evaluation shows an average 2.7x speedup in runtime over the traditional execution model with up to a 19x speedup in certain situations.

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

↑