Skip to main content

Constant propagation versus join reordering in Datalog

  • Conference paper
  • First Online:
Rules in Database Systems (RIDS 1995)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 985))

Included in the following conference series:

Abstract

Constant propagation and join reordering are two standard optimization techniques used for Datalog programs. These techniques have typically been studied independently of one another. However, in order to achieve constant propagation it is sometimes necessary to impose a certain join ordering on a given program. In the worst case this ordering may result in efficiencies which overcome the benefit of constant propagation. Thus the goal of constant propagation should not necessarily be pursued to the exclusion of all else. We study this problem in the context of GraphLog, a visual language whose queries are graphical notations which are translated into Datalog. We study two translation schemes from GraphLog to Datalog, one which always achieves constant propagation and another which does not. We show that each translation can significantly outperform the other. We demonstrate this by both measuring execution times using actual application data, and by providing analytical formulae to explain the trade-off between constant propagation and join reordering.

Most of this work was done while the author was on sabbatical at the University of Toronto.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. F. Bancilhon and R. Ramakrishnan. An Amateur's Introduction to Recursive Query Processing Strategies. In SIGMOD, pages 16–52, 1986.

    Google Scholar 

  2. C. Beeri and R. Ramakrishnan. On the Power of Magic. In PODS, pages 269–283, 1987.

    Google Scholar 

  3. M.P. Consens. Creating and Filtering Structural Data Visualizations using Hygraph Patterns. PhD thesis, Department of Computer Science, University of Toronto, February 1994. (Available as Technical Report CSRI-302).

    Google Scholar 

  4. M.P. Consens, F.Ch. Eigler, M.Z. Hasan, A.O. Mendelzon, E.G. Noik, A.G. Ryman, and D. Vista. Architecture and Applications of the Hy+ Visualization System. IBM Systems Journal, 33(3):458–476, 1994.

    Google Scholar 

  5. M.P. Consens and A.O. Mendelzon. GraphLog: A Visual Formalism for Real Life Recursion. In PODS, pages 404–416, 1990.

    Google Scholar 

  6. M.P. Consens, A.O. Mendelzon, and A. Ryman. Visualizing and Querying Software Structures. In ICSE '92, pages 138–156, 1992.

    Google Scholar 

  7. M.P. Consens, A.O. Mendelzon, and D. Vista. Deductive Database Support for Data Visualization. In EDBT, pages 45–58, 1994.

    Google Scholar 

  8. J. Han and H. Lu. Some Performance Results on Recursive Query Processing in Relational Database Systems. In ICDE, pages 533–539, 1986.

    Google Scholar 

  9. J.E. Hopcroft and J.D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979.

    Google Scholar 

  10. D. Kemp, K. Ramamohanarao, and Z. Somogyi. Right-, Left-, and Multi-Linear Rule Transformations that Maintain Context Information. In VLDB, pages 380–391, 1990.

    Google Scholar 

  11. J.F. Naughton, R. Ramakrishnan, Y. Sagiv, and J.D. Ullman. Argument Reduction by Factoring. In VLDB, pages 173–182, 1989.

    Google Scholar 

  12. R. Ramakrishnan, D. Srivastava, S. Sudarshan, and P. Seshadri. Implementation of the CORAL Deductive Database System. In SIGMOD, pages 167–176, 1993.

    Google Scholar 

  13. D. Vista and P.T. Wood. Efficient Evaluation of Visual Queries Using Deductive Databases. In R. Ramakrishnan, editor, Applications of Logic Databases, pages 143–161. Kluwer Academic Publishers, Boston, 1995.

    Google Scholar 

  14. P.T. Wood. Factoring Augmented Regular Chain Programs. In VLDB, pages 255–263, 1990.

    Google Scholar 

  15. P.T. Wood. Magic Factoring of Closure Programs. In PODS, pages 174–183, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Timos Sellis

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Consens, M.P., Mendelzon, A.O., Vista, D., Wood, P.T. (1995). Constant propagation versus join reordering in Datalog. In: Sellis, T. (eds) Rules in Database Systems. RIDS 1995. Lecture Notes in Computer Science, vol 985. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60365-4_131

Download citation

  • DOI: https://doi.org/10.1007/3-540-60365-4_131

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60365-8

  • Online ISBN: 978-3-540-45137-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics