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

一种用于最坏情况最优连接与采样的简单算法

A Simple Algorithm for Worst-Case Optimal Join and Sampling

Florent Capelli, Oliver Irwin, Sylvain Salvati

AI总结:

提出一种简单的分支定界算法,证明其在特定数据库上的连接查询具有最坏情况最优性,并可通过递归估计答案数上界转化为期望运行时间为 $O(UP/OUT)$ 的均匀采样算法,以模块化方式还原最新成果。

摘要:

我们提出了一种基本的分支定界算法,并对其为何在分别由基数或无环度约束定义的各类数据库上的连接查询中实现最坏情况最优性给出了简单分析。随后我们证明,若提供一种合理的方法来递归地估计连接查询答案数量的上界,我们的算法即可转化为对答案进行均匀采样的算法,其期望运行时间为 $O(UP/OUT)$,其中 $UP$ 为上界,$OUT$ 为实际答案数,且 $O(\cdot)$ 忽略对数多因子。我们的方法以模块化、简洁且基础的方式还原了关于最坏情况最优连接算法与采样的最新成果。

英文摘要:

We present an elementary branch and bound algorithm with a simple analysis of why it achieves worstcase optimality for join queries on classes of databases defined respectively by cardinality or acyclic degree constraints. We then show that if one is given a reasonable way for recursively estimating upper bounds on the number of answers of the join queries, our algorithm can be turned into algorithm for uniformly sampling answers with expected running time $O(UP/OUT)$ where $UP$ is the upper bound, $OUT$ is the actual number of answers and $O(\cdot)$ ignores polylogarithmic factors. Our approach recovers recent results on worstcase optimal join algorithm and sampling in a modular, clean and elementary way.

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

↑