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

数据库中不等式连接的选择性估计

Selectivity Estimation of Inequality Joins In Databases

Diogo Repas, Zhicheng Luo, Maxime Schoemans, Mahmoud Sakr

摘要:

选择性估计是指SQL查询优化器估计查询中谓词的结果大小的能力。它是主要的计算,优化器可以根据它来选择要执行的最便宜的计划。虽然这个问题在70年代中期就已经被人们所知,但令我们惊讶的是,文献中没有针对不等式连接的选择性估计的解决方案。通过测试四种常见的数据库系统:Oracle,SQL-Server,PostgreSQL和MySQL,我们发现开源系统PostgreSQL和MySQL缺乏这种估计。Oracle和SQL-Server做出了相当准确的估计,但它们的算法是保密的。因此,本文提出了一个算法不等式连接选择性估计。该算法已在PostgreSQL中实现,并作为补丁发送,将包含在下一个版本中。

英文摘要:

Selectivity estimation refers to the ability of the SQL query optimizer to estimate the size of the results of a predicate in the query. It is the main calculation, based on which the optimizer can select the cheapest plan to execute. While the problem is known since the mid 70s, we were surprised that there are no solutions in the literature for the selectivity estimation of inequality joins. By testing four common database systems: Oracle, SQL-Server, PostgreSQL, and MySQL, we found that the open-source systems PostgreSQL and MySQL lack this estimation. Oracle and SQL-Server make fairly accurate estimations, yet their algorithms are secret. This paper thus proposes an algorithm for inequality join selectivity estimation. The proposed algorithm has been implemented in PostgreSQL and sent as a patch to be included in the next releases.

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

↑