Evaluation Trade-Offs for Acyclic Conjunctive Queries

Authors Ahmet Kara , Milos Nikolic , Dan Olteanu , Haozhe Zhang

Thumbnail PDF


  • Filesize: 0.86 MB
  • 20 pages

Document Identifiers

Author Details

Ahmet Kara
  • Universität Zürich, Switzerland
Milos Nikolic
  • University of Edinburgh, UK
Dan Olteanu
  • Universität Zürich, Switzerland
Haozhe Zhang
  • Universität Zürich, Switzerland

Cite AsGet BibTex

Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Evaluation Trade-Offs for Acyclic Conjunctive Queries. In 31st EACSL Annual Conference on Computer Science Logic (CSL 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 252, pp. 29:1-29:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


We consider the evaluation of acyclic conjunctive queries, where the evaluation time is decomposed into preprocessing time and enumeration delay. In a seminal paper at CSL'07, Bagan, Durand, and Grandjean showed that acyclic queries can be evaluated with linear preprocessing time and linear enumeration delay. If the query is free-connex, the enumeration delay becomes constant. Further prior work showed that constant enumeration delay can be achieved for arbitrary acyclic conjunctive queries at the expense of a preprocessing time that is characterised by the fractional hypertree width. We introduce an approach that exposes a trade-off between preprocessing time and enumeration delay for acyclic conjunctive queries. The aforementioned prior works represent extremes in this trade-off space. Yet our approach also allows for the enumeration delay and the preprocessing time between these extremes, in particular the delay may lie between constant and linear time. Our approach decomposes the given query into subqueries and achieves for each subquery a trade-off that depends on a parameter controlling the times for preprocessing and enumeration. The complexity of the query is given by the Pareto optimal points of a bi-objective optimisation program whose inputs are possible query decompositions and parameter values.

Subject Classification

ACM Subject Classification
  • Theory of computation → Database query processing and optimization (theory)
  • Information systems → Database views
  • acyclic queries
  • query evaluation
  • enumeration delay


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Mahmoud Abo Khamis, Hung Q. Ngo, and Atri Rudra. FAQ: Questions Asked Frequently. In PODS, pages 13-28, 2016. Google Scholar
  2. Albert Atserias, Martin Grohe, and Dániel Marx. Size bounds and query plans for relational joins. SIAM J. Comput., 42(4):1737-1767, 2013. Google Scholar
  3. Guillaume Bagan, Arnaud Durand, and Etienne Grandjean. On Acyclic Conjunctive Queries and Constant Delay Enumeration. In CSL, pages 208-222, 2007. Google Scholar
  4. Christoph Berkholz, Fabian Gerhardt, and Nicole Schweikardt. Constant delay enumeration for conjunctive queries: a tutorial. ACM SIGLOG News, 7(1):4-33, 2020. Google Scholar
  5. Christoph Berkholz and Nicole Schweikardt. Constant delay enumeration with fpt-preprocessing for conjunctive queries of bounded submodular width. In MFCS, pages 58:1-58:15, 2019. Google Scholar
  6. Johann Brault-Baron. De la pertinence de l'énumération: complexité en logiques propositionnelle et du premier ordre. PhD thesis, Université de Caen, 2013. Google Scholar
  7. Shaleen Deep, Xiao Hu, and Paraschos Koutris. Enumeration algorithms for conjunctive queries with projection. In ICDT, pages 14:1-14:17, 2021. Google Scholar
  8. Arnaud Durand and Etienne Grandjean. First-order Queries on Structures of Bounded Degree are Computable with Constant Delay. ACM Trans. Comput. Logic, 8(4):21, 2007. Google Scholar
  9. Arnaud Durand and Yann Strozecki. Enumeration complexity of logical query problems with second-order variables. In CSL, pages 189-202, 2011. Google Scholar
  10. Georg Gottlob, Matthias Lanzinger, Reinhard Pichler, and Igor Razgon. Complexity analysis of generalized and fractional hypertree decompositions. J. ACM, 68(5):38:1-38:50, 2021. Google Scholar
  11. Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Trade-offs in Static and Dynamic Evaluation of Hierarchical Queries. In PODS, pages 375-392, 2020. Google Scholar
  12. Mahmoud Abo Khamis, Hung Q. Ngo, and Dan Suciu. What do shannon-type inequalities, submodular width, and disjunctive datalog have to do with one another? In PODS, pages 429-444, 2017. Google Scholar
  13. Dániel Marx. Approximating fractional hypertree width. ACM Trans. Alg., 6(2):29:1-29:17, 2010. Google Scholar
  14. Dániel Marx. Tractable hypergraph properties for constraint satisfaction and conjunctive queries. J. ACM, 60(6):42:1-42:51, 2013. Google Scholar
  15. Hung Q. Ngo, Ely Porat, Christopher Ré, and Atri Rudra. Worst-case optimal join algorithms. J. ACM, 65(3):16:1-16:40, 2018. Google Scholar
  16. Dan Olteanu and Jakub Závodný. Size Bounds for Factorised Representations of Query Results. ACM TODS, 40(1):2:1-2:44, 2015. Google Scholar
  17. Neil Robertson and Paul D. Seymour. Graph minors. III. planar tree-width. J. Comb. Theory, Ser. B, 36(1):49-64, 1984. Google Scholar
  18. Dan Suciu, Dan Olteanu, Christopher Ré, and Christoph Koch. Probabilistic Databases. Synthesis Lectures on Data Management. Morgan & Claypool Publishers, 2011. Google Scholar
  19. Mihalis Yannakakis. Algorithms for acyclic database schemes. In VLDB, pages 82-94, 1981. Google Scholar
  20. Clement T. Yu and Meral Z. Ozsoyoglu. An algorithm for tree-query membership of a distributed query. In COMPSAC, pages 306-312, 1979. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail