Worst-case Optimal Join Algorithms
Authors:
Top Cited Papers
Open Access
- 13 March 2018
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Journal of the ACM
- Vol. 65 (3) , 1-40
Abstract
Efficient join processing is one of the most fundamental and well-studied tasks in database research. In this work, we examine algorithms for natural join queries over many relations and describe a new algorithm to process these queries optimally in terms of worst-case data complexity. Our result builds on recent work by Atserias, Grohe, and Marx, who gave bounds on the size of a natural join query in terms of the sizes of the individual relations in the body of the query. These bounds, however, are not constructive: they rely on Shearer’s entropy inequality, which is information-theoretic. Thus, the previous results leave open the question of whether there exist algorithms whose runtimes achieve these optimal bounds. An answer to this question may be interesting to database practice, as we show in this article that any project-join style plans, such as ones typically employed in a relational database management system, are asymptotically slower than the optimal for some queries. We present an algorithm whose runtime is worst-case optimal for all natural join queries. Our result may be of independent interest, as our algorithm also yields a constructive proof of the general fractional cover bound by Atserias, Grohe, and Marx without using Shearer’s inequality. This bound implies two famous inequalities in geometry: the Loomis-Whitney inequality and its generalization, the Bollobás-Thomason inequality. Hence, our results algorithmically prove these inequalities as well. Finally, we discuss how our algorithm can be used to evaluate full conjunctive queries optimally, to compute a relaxed notion of joins and to optimally (in the worst-case) enumerate all induced copies of a fixed subgraph inside of a given large graph.Keywords
All Related Versions
Funding Information
- NSF (CCF-1161196, CCF-1319402, CCF-0844796 and CCF-1319402)
- Moore Foundation Data Driven Investigator Award
- American Family Insurance, Google, Lightspeed Ventures, and Toshiba
- Office of Naval Research (N000141210041 and N000141310129)
- National Science Foundation (NSF) under CAREER (IIS-1353606 and CCF-1356918)
- Sloan Research Fellowship
This publication has 64 references indexed in Scilit:
- A superadditivity and submultiplicativity property for cardinalities of sumsetsCombinatorica, 2010
- Generalized hypertree decompositions: NP-hardness and tractable variantsJournal of the ACM, 2009
- Extended wavelets for multiple measuresACM Transactions on Database Systems, 2007
- Partitioning multi-dimensional sets in a small number of “uniform” partsEuropean Journal of Combinatorics, 2007
- Hypertree Decompositions and Tractable QueriesJournal of Computer and System Sciences, 2002
- Conjunctive-Query Containment and Constraint SatisfactionJournal of Computer and System Sciences, 2000
- Applications of Range Query Theory to Relational Data Base Join and Selection OperationsJournal of Computer and System Sciences, 1996
- Connectivity, graph minors, and subgraph multiplicityJournal of Graph Theory, 1993
- Query evaluation techniques for large databasesACM Computing Surveys, 1993
- Tree queriesACM Transactions on Database Systems, 1982