Information Theory Strikes Back: New Development in the Theory of Cardinality Estimation
Mahmoud Abo Khamis, Vasileios Nakos, Dan Olteanu, Dan Suciu
TL;DR
The paper reframes cardinality estimation for conjunctive queries as an information-theoretic optimization problem by using $\ell_p$-norms of degree sequences to derive upper bounds on query outputs. Bounds are computed as the optimal value of a linear program that maximizes joint entropy under Shannon inequalities and $\ell_p$-norm constraints, generalizing AGM and PANDA to arbitrary norms. The approach yields a polymatroid-based dual characterization (Log-L-Bound) and a practical evaluation algorithm that reduces to PANDA via careful partitioning. Preliminary experiments on Berge-acyclic and triangle-join queries show that $\ell_p$-norm bounds can closely track true cardinalities and outperform traditional and some learned estimators, though they may overestimate when inputs are highly miscalibrated.
Abstract
Estimating the cardinality of the output of a query is a fundamental problem in database query processing. In this article, we overview a recently published contribution that casts the cardinality estimation problem as linear optimization and computes guaranteed upper bounds on the cardinality of the output for any full conjunctive query. The objective of the linear program is to maximize the joint entropy of the query variables and its constraints are the Shannon information inequalities and new information inequalities involving $\ell_p$-norms of the degree sequences of the join attributes. The bounds based on arbitrary norms can be asymptotically lower than those based on the $\ell_1$ and $\ell_\infty$ norms, which capture the cardinalities and respectively the max-degrees of the input relations. They come with a matching query evaluation algorithm, are computable in exponential time in the query size, and are provably tight when each degree sequence is on one join attribute.
