[Paper Review] Computing Join Queries with Functional Dependencies
This paper presents a novel algorithm for computing join queries with functional dependencies (FDs) that runs within the GLVV bound—up to a poly-logarithmic factor—making it worst-case optimal when the bound is tight. The approach leverages lattice theory to replace variable subsets with closed sets under FDs, transforming proofs of polymatroid-based bounds into executable algorithms, and handles degree constraints beyond FDs, such as cardinality bounds.
Recently, Gottlob, Lee, Valiant, and Valiant (GLVV) presented an output size bound for join queries with functional dependencies (FD), based on a linear program on polymatroids. GLVV bound strictly generalizes the bound of Atserias, Grohe and Marx (AGM) for queries with no FD, in which case there are known algorithms running within AGM bound and thus are worst-case optimal. A main result of this paper is an algorithm for computing join queries with FDs, running within GLVV bound up to a poly-log factor. In particular, our algorithm is worst-case optimal for any query where the GLVV bound is tight. As an unexpected by-product, our algorithm manages to solve a harder problem, where (some) input relations may have prescribed maximum degree bounds, of which both functional dependencies and cardinality bounds are special cases. We extend Gottlob et al. framework by replacing all variable subsets with the lattice of closed sets (under the given FDs). This gives us new insights into the structure of the worst-case bound and worst-case instances. While it is still open whether GLVV bound is tight in general, we show that it is tight on distributive lattices and some other simple lattices. Distributive lattices capture a strict superset of queries with no FD and with simple FDs. We also present two simpler algorithms which are also worst-case optimal on distributive lattices within a single-$\log$ factor, but they do not match GLVV bound on a general lattice. Our algorithms are designed based on a novel principle: we turn a proof of a polymatroid-based output size bound into an algorithm.
Motivation & Objective
- To develop a worst-case optimal algorithm for join queries under functional dependencies, where traditional bounds fail.
- To extend the AGM and GLVV bounds to handle degree constraints beyond FDs, such as cardinality bounds.
- To unify the treatment of functional dependencies and degree bounds via lattice-theoretic structures.
- To demonstrate that the GLVV bound is tight on distributive lattices and certain simple lattices.
- To design a general-purpose algorithm that transforms theoretical bounds into practical, efficient query processing.
Proposed method
- Replace the standard variable subset lattice with the lattice of closed sets under given functional dependencies to model query semantics more precisely.
- Use a linear program over polymatroids and extend it to the lattice of closed sets to derive worst-case output size bounds.
- Design a novel algorithm, CSMA, that turns a proof of a polymatroid inequality into a query execution strategy via recursive rule application.
- Introduce a dual solution framework with netflow constraints to guide pruning and ensure correctness during recursive execution.
- Apply a branching strategy with multiplicative reduction in objective value to achieve exponential decay in recursion depth.
- Handle degree bounds by partitioning relations based on log-degree buckets and balancing table sizes to maintain efficiency.
Experimental results
Research questions
- RQ1Can a join query algorithm be designed that runs within the GLVV bound for queries with functional dependencies?
- RQ2Is the GLVV bound tight for any class of lattices beyond the AGM case?
- RQ3Can the algorithm handle not only functional dependencies but also arbitrary degree constraints on input relations?
- RQ4Can a proof of a polymatroid inequality be systematically transformed into a working query execution algorithm?
- RQ5What is the complexity of the algorithm relative to the GLVV bound, and can the poly-log factor be reduced in special cases?
Key findings
- The proposed algorithm runs in time O(N + (log N)^e * 2^OPT), where OPT is the optimal value of the GLVV linear program, achieving the GLVV bound up to a poly-log factor.
- The algorithm is worst-case optimal for any query where the GLVV bound is tight, including those on distributive lattices.
- The GLVV bound is proven to be tight on distributive lattices and certain other simple lattices, extending the scope of known tight bounds.
- A simpler variant of the algorithm achieves worst-case optimality within a single log factor on distributive lattices, though it does not match the GLVV bound on general lattices.
- The framework successfully generalizes to handle input relations with prescribed maximum degree bounds, subsuming both FDs and cardinality constraints.
- The core insight—transforming a proof of a polymatroid inequality into a query execution algorithm—provides a new paradigm for designing worst-case optimal query plans.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.