
Cardinality Estimation of an SQL Query Using Recursive Neural Networks
Author(s) -
Davit S. Karamyan
Publication year - 2020
Publication title -
mathematical problems of computer science
Language(s) - English
Resource type - Journals
eISSN - 2738-2788
pISSN - 2579-2784
DOI - 10.51408/1963-0058
Subject(s) - computer science , cardinality (data modeling) , set (abstract data type) , query optimization , expression (computer science) , theoretical computer science , histogram , data mining , artificial intelligence , algorithm , programming language , image (mathematics)
To learn complex interactions between predicates and accurately estimate the cardinality of an SQL query, we develop a novel framework based on recursive tree-structured neural networks, which take into account the natural properties of logical expressions: compositionality and n-ary associativity. The proposed architecture is an extension of MSCN (multi-set convolutional network) for queries containing both conjunction and disjunction operators. The goal is to represent an arbitrary logical expression in a continuous vector space by combining sub-expression vectors according to the operator type. We compared the proposed approach with the histogram-based approach on the real-world dataset and showed that our approach significantly outperforms histograms with a large margin.