skip to main content
10.1145/3035918.3064027acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

The Dynamic Yannakakis Algorithm: Compact and Efficient Query Processing Under Updates

Published:09 May 2017Publication History

ABSTRACT

Modern computing tasks such as real-time analytics require refresh of query results under high update rates. Incremental View Maintenance (IVM) approaches this problem by materializing results in order to avoid recomputation. IVM naturally induces a trade-off between the space needed to maintain the materialized results and the time used to process updates. In this paper, we show that the full materialization of results is a barrier for more general optimization strategies. In particular, we present a new approach for evaluating queries under updates. Instead of the materialization of results, we require a data structure that allows: (1) linear time maintenance under updates, (2) constant-delay enumeration of the output, (3) constant-time lookups in the output, while (4) using only linear space in the size of the database. We call such a structure a Dynamic Constant-delay Linear Representation (DCLR) for the query. We show that DYN, a dynamic version of the Yannakakis algorithm, yields DCLRs for the class of free-connex acyclic CQs. We show that this is optimal in the sense that no DCLR can exist for CQs that are not free-connex acyclic. Moreover, we identify a sub-class of queries for which DYN features constant-time update per tuple and show that this class is maximal. Finally, using the TPC-H and TPC-DS benchmarks, we experimentally compare DYN and a higher-order IVM (HIVM) engine. Our approach is not only more efficient in terms of memory consumption (as expected), but is also consistently faster in processing updates.

References

  1. S. Abiteboul, R. Hull, and V. Vianu. Foundations of databases. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Abo Khamis, H. Q. Ngo, and A. Rudra. FAQ: Questions asked frequently. In Proc. of PODS, pages 13--28, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. E. Adiba and B. G. Lindsay. Database snapshots. In Proc. of VLDB 1980, pages 86--91, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. M. Aji and R. J. McEliece. The generalized distributive law. IEEE Trans. Information Theory, 46(2):325--343, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Bagan, A. Durand, and E. Grandjean. On acyclic conjunctive queries and constant delay enumeration. In Proc. of CSL, pages 208--222, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Bakibayev, T. Kočiský, D. Olteanu, and J. Závodný. Aggregation and ordering in factorised databases. Proc. of VLDB, 6(14):1990--2001, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Berkholz, J. Keppeler, and N. Schweikardt. Answering conjunctive queries under updates. In Proc. of PODS, 2017. To appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. A. Blakeley, N. Coburn, and P.-V. Larson. Updating derived relations: Detecting irrelevant and autonomously computable updates. ACM TODS, (3):369--400, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. A. Blakeley, P.-A. Larson, and F. W. Tompa. Efficiently updating materialized views. In Proc. of SIGMOD, pages 61--71, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Brault-Baron. De la pertinence de l'énumération: complexité en logiques. PhD thesis, Université de Caen, 2013.Google ScholarGoogle Scholar
  11. O. P. Buneman and E. K. Clemons. Efficiently monitoring relational databases. ACM TODS, (3):368--382, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Ceri and J. Widom. Deriving production rules for incremental view maintenance. In Proc. of VLDB, pages 577--589, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Chirkova and J. Yang. Materialized Views. Now Publishers Inc., Hanover, MA, USA, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Cormen. Introduction to Algorithms, 3rd Edition:. MIT Press, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Cugola and A. Margara. Processing flows of information: From data stream to complex event processing. ACM CSUR, 44(3):15:1--15:62, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. N. Dalvi and D. Suciu. The dichotomy of probabilistic inference for unions of conjunctive queries. J. ACM, 59(6):30:1--30:87, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. Fink and D. Olteanu. Dichotomies for queries with negation in probabilistic databases. ACM TODS, 41(1):4:1--4:47, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. G. Gottlob, M. Grohe, n. Musliu, M. Samer, and F. Scarcello. Hypertree decompositions: Structure, algorithms, and applications. In Proc. of WG, pages 1--15, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. Gottlob, N. Leone, and F. Scarcello. Robbers, marshals, and guards: game theoretic and logical characterizations of hypertree width. J. Comput. Syst. Sci., 66(4):775--808, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Gupta, I. S. Mumick, and V. S. Subrahmanian. Maintaining views incrementally. In Proc. of SIGMOD, pages 157--166, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. H. Gupta and I. S. Mumick. Incremental maintenance of aggregate and outerjoin expressions. Information Systems, (6):435--464, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Henzinger, S. Krinninger, D. Nanongkai, and T. Saranurak. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Proc. of STOC, pages 21--30, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. R. Joglekar, R. Puttagunta, and C. Ré. Ajar: Aggregations and joins over annotated relations. In Proc. of PODS, pages 91--106, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Kawaguchi, D. Lieuwen, I. Mumick, and K. Ross. Implementing incremental view maintenance in nested data models. In Proc. of DBPL, pages 202--221, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Koch. Incremental query evaluation in a ring of databases. In Proc. of PODS, pages 87--98, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. Koch, Y. Ahmad, O. Kennedy, M. Nikolic, A. Nötzli, D. Lupei, and A. Shaikhha. Dbtoaster: higher-order delta processing for dynamic, frequently fresh views. VLDB Journal, pages 253--278, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Koutris and D. Suciu. Parallel evaluation of conjunctive queries. In Proc. of PODS, pages 223--234, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. I. S. Mumick, D. Quass, and B. S. Mumick. Maintenance of data cubes and summary tables in a warehouse. SIGMOD Records, 26(2):100--111, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. H. Q. Ngo, C. Ré, and A. Rudra. Skew strikes back: New developments in the theory of join algorithms. SIGMOD Records, 42(4):5--16, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Nikolic, M. Dashti, and C. Koch. How to win a hot dog eating contest: Distributed incremental view maintenance with batch updates. In Proc.of SIGMOD, pages 511--526, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. Olteanu and J. Závodný. Size bounds for factorised representations of query results. ACM TODS, 40(1):2:1--2:44, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. C. H. Papadimitriou. Computational complexity. In Encyclopedia of Computer Science, pages 260--265. 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. X. Qian and G. Wiederhold. Incremental recomputation of active relational expressions. IEEE Trans. on Knowl. and Data Eng., 3(3):337--341, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. K. A. Ross, D. Srivastava, and S. Sudarshan. Materialized view maintenance and integrity constraint checking: Trading space for time. In Proc. of SIGMOD, pages 447--458, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. N. Roussopoulos. Materialized views and data warehouses. SIGMOD Records, 27(1):21--26, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Schleich, D. Olteanu, and R. Ciucanu. Learning linear regression models over factorized joins. In Proc. of SIGMOD, pages 3--18, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. L. Segoufin. Constant delay enumeration for conjunctive queries. SIGMOD Record, 44(1):10--17, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. M. Y. Vardi. The complexity of relational query languages (extended abstract). In Proc. of STOC, pages 137--146, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. Yannakakis. Algorithms for acyclic database schemes. In Proc. of VLDB, pages 82--94, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The Dynamic Yannakakis Algorithm: Compact and Efficient Query Processing Under Updates

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                SIGMOD '17: Proceedings of the 2017 ACM International Conference on Management of Data
                May 2017
                1810 pages
                ISBN:9781450341974
                DOI:10.1145/3035918

                Copyright © 2017 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 9 May 2017

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                Overall Acceptance Rate785of4,003submissions,20%

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader