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

基于视图的聚集映射重写算法

Algorithms for Rewriting Aggregate Queries Using Views

Sara Cohen, Werner Nutt, Alexander Serebrenik

摘要:

在数据库应用程序中,涉及聚合的查询是典型的。优化聚合查询执行的主要思想之一是重用以前回答的查询结果。这导致了使用视图重写聚合查询的问题。由于缺乏理论,这个问题的算法相当特别。他们是健全的,但没有被证明是完整的。最近,我们给出了语法特征的等价性的聚合查询,并应用它们来决定是否存在重写。然而,这些决策程序并不适合于立即实施。在本文中,我们提出了实用的算法重写查询与$\COUNT$和$\SUM$。我们的算法是合理的。对于重要案件也是如此。我们的技术可以用来改善众所周知的程序重写非聚合查询。然后,这些过程可以适于获得用于用$\MIN$和$\MAX$重写查询的算法。提出的算法是实现优化器的基础,重写查询使用视图。

英文摘要:

Queries involving aggregation are typical in database applications. One of the main ideas to optimize the execution of an aggregate query is to reuse results of previously answered queries. This leads to the problem of rewriting aggregate queries using views. Due to a lack of theory, algorithms for this problem were rather ad-hoc. They were sound, but were not proven to be complete. Recently we have given syntactic characterizations for the equivalence of aggregate queries and applied them to decide when there exist rewritings. However, these decision procedures do not lend themselves immediately to an implementation. In this paper, we present practical algorithms for rewriting queries with $\COUNT$ and $\SUM$. Our algorithms are sound. They are also complete for important cases. Our techniques can be used to improve well-known procedures for rewriting non-aggregate queries. These procedures can then be adapted to obtain algorithms for rewriting queries with $\MIN$ and $\MAX$. The algorithms presented are a basis for realizing optimizers that rewrite queries using views.

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

↑