arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2010.00307cs.DBcs.ITmath.IT
收藏

理解使用连接进行近似查询处理的困难

Understanding the hardness of approximate query processing with joins

Tianyu Liu, Chi Wang

摘要:

我们研究的硬度近似查询处理(AQP)的各种类型的查询,涉及连接多个表的可能不同的大小。在查询结果是单个值的情况下(例如,的最坏情况下的信息理论下界的AQP问题,给定参数$ε$和$δ$,并返回估计结果的一个因素的1+ $ε$的真实结果与错误概率最多$δ$。特别是,在各种设置下的连接基数估计的下界包含在我们的结果。非正式地,我们的研究结果表明,对于各种数据库查询与连接,除非限制到一组查询的结果总是保证在一个非常大的阈值以上,AQP算法需要返回一个准确的近似值的信息量至少是线性的行数在最大的表。类似的下限甚至适用于一些特殊情况,其中附加信息,如前K个重击球手和所有频率矢量可用。在查询结果不是单个数字的GROUP-BY的情况下,我们研究了任何近似算法所使用的信息量的下限,该算法不报告任何不存在的组,也不错过总大小较大的组。我们的工作扩展了Alon,Gibbons,Matias和Szegedy [AGMS 99]的工作。我们将我们的下限与Bernoulli采样所需的信息量进行比较,以给出准确的近似。对于在相同大小的多个表上进行连接的查询,上限与下限匹配,除非问题设置限制为查询集,其结果始终保证高于非常大的阈值。

英文摘要:

We study the hardness of Approximate Query Processing (AQP) of various types of queries involving joins over multiple tables of possibly different sizes. In the case where the query result is a single value (e.g., COUNT, SUM, and COUNT(DISTINCT)), we prove worst-case information-theoretic lower bounds for AQP problems that are given parameters $ε$ and $δ$, and return estimated results within a factor of 1+$ε$ of the true results with error probability at most $δ$. In particular, the lower bounds for cardinality estimation over joins under various settings are contained in our results. Informally, our results show that for various database queries with joins, unless restricted to the set of queries whose results are always guaranteed to be above a very large threshold, the amount of information an AQP algorithm needs for returning an accurate approximation is at least linear in the number of rows in the largest table. Similar lower bounds even hold for some special cases where additional information such as top-K heavy hitters and all frequency vectors are available. In the case of GROUP-BY where the query result is not a single number, we study the lower bound for the amount of information used by any approximation algorithm that does not report any non-existing group and does not miss groups of large total size. Our work extends the work of Alon, Gibbons, Matias, and Szegedy [AGMS99].We compare our lower bounds with the amount of information required by Bernoulli sampling to give an accurate approximation. For COUNT queries with joins over multiple tables of the same size, the upper bound matches the lower bound, unless the problem setting is restricted to the set of queries whose results are always guaranteed to be above a very large threshold.

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

↑