arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2101.12158cs.DBcs.DS
收藏

超越等价连接:排序、枚举和因子分解

Beyond Equi-joins: Ranking, Enumeration and Factorization

Nikolaos Tziavelis, Wolfgang Gatterbauer, Mirek Riedewald

摘要:

我们研究θ-连接一般和连接谓词与合取和析取的不平等,特别是,重点排名枚举的答案是递增返回的顺序由给定的排名功能。我们的方法实现了强大的时间和空间复杂度的属性:$n$表示数据库中的元组的数量,我们保证非循环的全连接查询与不等式条件,对于每个值的$k$,$k$排名靠前的答案返回$\mathcal{O}(n \operatorname{polylog} n + k \log k)$时间。这在$\mathcal{O}(n + k \log k)$的多对数因子内,即,最为人所知的等价连接的复杂性,甚至是$\mathcal{O}(n+k)$的复杂性,即,查看输入并以任何顺序返回$k$答案所需的时间。我们的保证扩展到连接查询的选择和许多类型的投影(即那些所谓的“自由连接”查询和那些使用包语义)。值得注意的是,对于$\ell$关系的连接,即使连接结果的数量为$n^\ell$,它们也成立。的关键成分是一种新的$\mathcal{O}(n \operatorname{polylog} n)$ -大小因式分解表示的查询输出,这是构建在一个给定的查询和数据库的飞行。除了提供第一个非平凡的理论保证超越equi-joins,我们在实验研究中表明,我们的排名枚举方法也是内存效率和速度在实践中,击败国家的最先进的数据库系统的运行时间的数量级。

英文摘要:

We study theta-joins in general and join predicates with conjunctions and disjunctions of inequalities in particular, focusing on ranked enumeration where the answers are returned incrementally in an order dictated by a given ranking function. Our approach achieves strong time and space complexity properties: with $n$ denoting the number of tuples in the database, we guarantee for acyclic full join queries with inequality conditions that for every value of $k$, the $k$ top-ranked answers are returned in $\mathcal{O}(n \operatorname{polylog} n + k \log k)$ time. This is within a polylogarithmic factor of $\mathcal{O}(n + k \log k)$, i.e., the best known complexity for equi-joins, and even of $\mathcal{O}(n+k)$, i.e., the time it takes to look at the input and return $k$ answers in any order. Our guarantees extend to join queries with selections and many types of projections (namely those called "free-connex" queries and those that use bag semantics). Remarkably, they hold even when the number of join results is $n^\ell$ for a join of $\ell$ relations. The key ingredient is a novel $\mathcal{O}(n \operatorname{polylog} n)$-size factorized representation of the query output, which is constructed on-the-fly for a given query and database. In addition to providing the first non-trivial theoretical guarantees beyond equi-joins, we show in an experimental study that our ranked-enumeration approach is also memory-efficient and fast in practice, beating the running time of state-of-the-art database systems by orders of magnitude.

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

↑