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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
F. Bancilhon and R. Ramakrishnan. An Amateur's Introduction to Recursive Query Processing Strategies. In SIGMOD, pages 16–52, 1986.
C. Beeri and R. Ramakrishnan. On the Power of Magic. In PODS, pages 269–283, 1987.
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).
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.
M.P. Consens and A.O. Mendelzon. GraphLog: A Visual Formalism for Real Life Recursion. In PODS, pages 404–416, 1990.
M.P. Consens, A.O. Mendelzon, and A. Ryman. Visualizing and Querying Software Structures. In ICSE '92, pages 138–156, 1992.
M.P. Consens, A.O. Mendelzon, and D. Vista. Deductive Database Support for Data Visualization. In EDBT, pages 45–58, 1994.
J. Han and H. Lu. Some Performance Results on Recursive Query Processing in Relational Database Systems. In ICDE, pages 533–539, 1986.
J.E. Hopcroft and J.D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979.
D. Kemp, K. Ramamohanarao, and Z. Somogyi. Right-, Left-, and Multi-Linear Rule Transformations that Maintain Context Information. In VLDB, pages 380–391, 1990.
J.F. Naughton, R. Ramakrishnan, Y. Sagiv, and J.D. Ullman. Argument Reduction by Factoring. In VLDB, pages 173–182, 1989.
R. Ramakrishnan, D. Srivastava, S. Sudarshan, and P. Seshadri. Implementation of the CORAL Deductive Database System. In SIGMOD, pages 167–176, 1993.
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.
P.T. Wood. Factoring Augmented Regular Chain Programs. In VLDB, pages 255–263, 1990.
P.T. Wood. Magic Factoring of Closure Programs. In PODS, pages 174–183, 1995.
Author information
Authors and Affiliations
Editor information
Rights 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