Robust Cardinality: a novel approach for cardinality prediction in SQL queries.

Autor: B. S. Praciano, Francisco D., Amora, Paulo R. P., Abreu, Italo C., Pereira, Francisco L. F., Machado, Javam C.
Předmět:
Zdroj: Journal of the Brazilian Computer Society; 9/1/2021, Vol. 27 Issue 1, p1-24, 24p
Abstrakt: Background: Database Management Systems (DBMSs) use declarative language to execute queries to stored data. The DBMS defines how data will be processed and ultimately retrieved. Therefore, it must choose the best option from the different possibilities based on an estimation process. The optimization process uses estimated cardinalities to make optimization decisions, such as choosing predicate order. Methods: In this paper, we propose Robust Cardinality, an approach to calculate cardinality estimates of query operations to guide the execution engine of the DBMSs to choose the best possible form or at least avoid the worst one. By using machine learning, instead of the current histogram heuristics, it is possible to improve these estimates; hence, leading to more efficient query execution. Results: We perform experimental tests using PostgreSQL, comparing both estimators and a modern technique proposed in the literature. With Robust Cardinality, a lower estimation error of a batch of queries was obtained and PostgreSQL executed these queries more efficiently than when using the default estimator. We observed a 3% reduction in execution time after reducing 4 times the query estimation error. Conclusions: From the results, it is possible to conclude that this new approach results in improvements in query processing in DBMSs, especially in the generation of cardinality estimates. [ABSTRACT FROM AUTHOR]
Databáze: Complementary Index