FACE: A Normalizing Flow based Cardinality Estimator

被引:24
|
作者
Wang, Jiayi [1 ]
Chai, Chengliang [1 ]
Liu, Jiabin [1 ]
Li, Guoliang [1 ]
机构
[1] Tsinghua Univ, Beijing, Peoples R China
来源
PROCEEDINGS OF THE VLDB ENDOWMENT | 2021年 / 15卷 / 01期
基金
中国博士后科学基金;
关键词
PREDICTION;
D O I
10.14778/3485450.3485458
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
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 approaches. Query-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 data. Third, 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
相关论文
共 50 条
  • [21] Cardinality Estimator: Processing SQL with a Vertical Scanning Convolutional Neural Network
    Shao-Jie Qiao
    Guo-Ping Yang
    Nan Han
    Hao Chen
    Fa-Liang Huang
    Kun Yue
    Yu-Gen Yi
    Chang-An Yuan
    Journal of Computer Science and Technology, 2021, 36 : 762 - 777
  • [22] AN INTEGRAL-BASED CURVATURE ESTIMATOR AND ITS APPLICATION IN FACE RECOGNITION
    Lin, Wei-Yang
    Chiu, Yen-Lin
    Widder, Kerry R.
    Hu, Yu Hen
    Boston, Nigel
    2010 IEEE INTERNATIONAL CONFERENCE ON MULTIMEDIA AND EXPO (ICME 2010), 2010, : 185 - 190
  • [23] Graph-based Normalizing Flow for Human Motion Generation and Reconstruction
    Yin, Wenjie
    Yin, Hang
    Kragic, Danica
    Bjorkman, Marten
    2021 30TH IEEE INTERNATIONAL CONFERENCE ON ROBOT AND HUMAN INTERACTIVE COMMUNICATION (RO-MAN), 2021, : 641 - 648
  • [24] Normalizing Flow-Based Industrial Complex Background Anomaly Detection
    Wen, Pengxv
    Gao, Xiaorong
    Wang, Yong
    Li, Jinlong
    Luo, Lin
    JOURNAL OF SENSORS, 2023, 2023
  • [25] Entropy Eestimation via Normalizing Flow
    Ao, Ziqiao
    Li, Jinglai
    THIRTY-SIXTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE / THIRTY-FOURTH CONFERENCE ON INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE / TWELVETH SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2022, : 9990 - 9998
  • [26] Diverse Image Inpainting with Normalizing Flow
    Wang, Cairong
    Zhu, Yiming
    Yuan, Chun
    COMPUTER VISION, ECCV 2022, PT XXIII, 2022, 13683 : 53 - 69
  • [27] Distilling Distribution Knowledge in Normalizing Flow
    Kwon, Jungwoo
    Kim, Gyeonghwan
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2023, E106D (08) : 1287 - 1291
  • [28] Normalizing flow regularization for photoacoustic tomography
    Wang, Chao
    Thiery, Alexandre H.
    INVERSE PROBLEMS, 2024, 40 (11)
  • [29] Unsupervised Learning of PCFGs with Normalizing Flow
    Jin, Lifeng
    Doshi-Velez, Finale
    Miller, Timothy
    Schuler, William
    Schwartz, Lane
    57TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2019), 2019, : 2442 - 2452
  • [30] Integrating a maximum-entropy cardinality estimator into DB2 UDB
    Kutsch, M
    Haas, PJ
    Markl, V
    Megiddo, N
    Tran, TM
    ADVANCES IN DATABASE TECHNOLOGY - EDBT 2006, 2006, 3896 : 1092 - 1096