FACE: A Normalizing Flow based Cardinality Estimator

Jiayi Wang, Chengliang Chai, Jiabin Liu, Guoliang Li

科研成果: 期刊稿件会议文章同行评审

42 引用 (Scopus)

摘要

Cardinality estimation is one of the most important problems in query optimization. Recently, machine learning based techniques have been proposed to effectively estimate cardinality, which can be broadly classified into query-driven and data-driven approachesQuery-driven approaches learn a regression model from a query to its cardinality; while data-driven approaches learn a distribution of tuples, select some samples that satisfy a SQL query, and use the data distributions of these selected tuples to estimate the cardinality of the SQL query. As query-driven methods rely on training queries, the estimation quality is not reliable when there are no high-quality training queries; while data-driven methods have no such limitation and have high adaptivity. In this work, we focus on data-driven methods. A good datadriven model should achieve three optimization goals. First, the model needs to capture data dependencies between columns and support large domain sizes (achieving high accuracy). Second, the model should achieve high inference efficiency, because many data samples are needed to estimate the cardinality (achieving low inference latency). Third, the model should not be too large (achieving a small model size). However, existing data-driven methods cannot simultaneously optimize the three goals. To address the limitations, we propose a novel cardinality estimator FACE, which leverages the Normalizing Flow based model to learn a continuous joint distribution for relational data. FACE can transform a complex distribution over continuous random variables into a simple distribution (e.g., multivariate normal distribution), and use the probability density to estimate the cardinality. First, we design a dequantization method to make data more “continuous”. Second, we propose encoding and indexing techniques to handle Like predicates for string dataThird, we propose a Monte Carlo method to efficiently estimate the cardinality. Experimental results show that our method significantly outperforms existing approaches in terms of estimation accuracy while keeping similar latency and model size.

源语言英语
页(从-至)72-84
页数13
期刊Proceedings of the VLDB Endowment
15
1
DOI
出版状态已出版 - 2021
已对外发布
活动48th International Conference on Very Large Data Bases, VLDB 2022 - Sydney, 澳大利亚
期限: 5 9月 20229 9月 2022

指纹

探究 'FACE: A Normalizing Flow based Cardinality Estimator' 的科研主题。它们共同构成独一无二的指纹。

引用此