Are We Ready For Learned Cardinality Estimation?

12/12/2020
by   Xiaoying Wang, et al.
0

Cardinality estimation is a fundamental but long unresolved problem in query optimization. Recently, multiple papers from different research groups consistently report that learned models have the potential to replace existing cardinality estimators. In this paper, we ask a forward-thinking question: Are we ready to deploy these learned cardinality models in production? Our study consists of three main parts. Firstly, we focus on the static environment (i.e., no data updates) and compare five new learned methods with eight traditional methods on four real-world datasets under a unified workload setting. The results show that learned models are indeed more accurate than traditional methods, but they often suffer from high training and inference costs. Secondly, we explore whether these learned models are ready for dynamic environments (i.e., frequent data updates). We find that they cannot catch up with fast data up-dates and return large errors for different reasons. For less frequent updates, they can perform better but there is no clear winner among themselves. Thirdly, we take a deeper look into learned models and explore when they may go wrong. Our results show that the performance of learned methods can be greatly affected by the changes in correlation, skewness, or domain size. More importantly, their behaviors are much harder to interpret and often unpredictable. Based on these findings, we identify two promising research directions (control the cost of learned models and make learned models trustworthy) and suggest a number of research opportunities. We hope that our study can guide researchers and practitioners to work together to eventually push learned cardinality estimators into real database systems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/25/2023

Duet: efficient and scalable hybriD neUral rElation undersTanding

Learned cardinality estimation methods have achieved high precision comp...
research
03/31/2023

Scardina: Scalable Join Cardinality Estimation by Multiple Density Estimators

In recent years, machine learning-based cardinality estimation methods a...
research
08/11/2021

A General Cardinality Estimation Framework for Subgraph Matching in Property Graphs

Many techniques have been developed for the cardinality estimation probl...
research
06/06/2019

An End-to-End Learning-based Cost Estimator

Cost and cardinality estimation is vital to query optimizer, which can g...
research
09/02/2019

DeepDB: Learn from Data, not from Queries!

The typical approach for learned DBMS components is to capture the behav...
research
07/06/2022

Are Updatable Learned Indexes Ready?

Recently, numerous promising results have shown that updatable learned i...
research
02/06/2022

Learning to be a Statistician: Learned Estimator for Number of Distinct Values

Estimating the number of distinct values (NDV) in a column is useful for...

Please sign up or login with your details

Forgot password? Click here to reset