Selectivity Estimation of Inequality Joins in Databases

被引:1
作者
Repas, Diogo [1 ]
Luo, Zhicheng [1 ]
Schoemans, Maxime [1 ]
Sakr, Mahmoud [1 ,2 ]
机构
[1] Univ libre Bruxelles ULB, Data Sci Lab, B-1050 Brussels, Belgium
[2] Ain Shams Univ, Fac Comp & Informat Sci, Cairo 11566, Egypt
关键词
SQL; query optimization; optimizer statistics;
D O I
10.3390/math11061383
中图分类号
O1 [数学];
学科分类号
0701 ; 070101 ;
摘要
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 least expensive plan to execute. While the problem has been known since the mid-1970s, 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 was implemented in PostgreSQL and sent as a patch to be included in the next releases. We compared this implementation with the above DBMS for three different data distributions (uniform, normal, and Zipfian) and showed that our algorithm provides extremely accurate estimations (below 0.1% average error), outperforming the other systems by an order of magnitude.
引用
收藏
页数:18
相关论文
共 30 条
[1]   Deterministic and non-deterministic query optimization techniques in the cloud computing [J].
Azhir, Elham ;
Navimipour, Nima Jafari ;
Hosseinzadeh, Mehdi ;
Sharifi, Arash ;
Darwesh, Aso .
CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2019, 31 (17)
[2]  
Bruno N., 2020, P ACM SIGMOD INT C M, P263
[3]   A HISTORY AND EVALUATION OF SYSTEM-R [J].
CHAMBERLIN, DD ;
ASTRAHAN, MM ;
BLASGEN, MW ;
GRAY, JN ;
KING, WF ;
LINDSAY, BG ;
LORIE, R ;
MEHL, JW ;
PRICE, TG ;
PUTZOLU, F ;
SELINGER, PG ;
SCHKOLNICK, M ;
SLUTZ, DR ;
TRAIGER, IL ;
WADE, BW ;
YOST, RA .
COMMUNICATIONS OF THE ACM, 1981, 24 (10) :632-646
[4]   Synopses for Massive Data: Samples, Histograms, Wavelets, Sketches [J].
Cormode, Graham ;
Garofalakis, Minos ;
Haas, Peter J. ;
Jermaine, Chris .
FOUNDATIONS AND TRENDS IN DATABASES, 2011, 4 (1-3) :1-294
[5]  
DellEra A., 2008, JOIN HISTOGRAMS
[6]   Reversible Data Hiding with a New Local Contrast Enhancement Approach [J].
Fragoso-Navarro, Eduardo ;
Cedillo-Hernandez, Manuel ;
Garcia-Ugalde, Francisco ;
Morelos-Zaragoza, Robert .
MATHEMATICS, 2022, 10 (05)
[7]  
Graefe G., 1993, Proceedings. Ninth International Conference on Data Engineering (Cat. No.92CH3258-1), P209, DOI 10.1109/ICDE.1993.344061
[8]  
Graefe G., 2014, IEEE DATA ENG B, V18, P19
[9]   Deep Learning Models for Selectivity Estimation of Multi-Attribute Queries [J].
Hasan, Shohedul ;
Thirumuruganathan, Saravanan ;
Augustine, Jees ;
Koudas, Nick ;
Das, Gautam .
SIGMOD'20: PROCEEDINGS OF THE 2020 ACM SIGMOD INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA, 2020, :1035-1050
[10]   Selectivity Functions of Range Queries are Learnable [J].
Hu, Xiao ;
Liu, Yuxi ;
Xiu, Haibo ;
Agarwal, Pankaj K. ;
Panigrahi, Debmalya ;
Roy, Sudeepa ;
Yang, Jun .
PROCEEDINGS OF THE 2022 INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA (SIGMOD '22), 2022, :959-972