Efficient evaluation of right-, left-, and multi-linear rules

We present an algorithm for the efficient evaluation of a useful subset of recursive queries. Like the magic sets transformation, the algorithm consists of a rewriting phase followed by semi-naive bottom-up evaluation of the resulting rules. We prove that on a wide range of recursions, this algorithm achieves a factor of &Ogr;(n) speedup over magic sets. Intuitively, the transformations in this algorithm achieve their performance by reducing the arity of the recursive predicates in the transformed rules.

[1]  Rakesh Agrawal Alpha: An extension of relational algebra to express a class of recursive queries , 1987, 1987 IEEE Third International Conference on Data Engineering.

[2]  Laurent Vieille,et al.  Recursive Axioms in Deductive Databases: The Query/Subquery Approach , 1986, Expert Database Conf..

[3]  E. L. Lozinskii,et al.  A Framework for an Efficient Implementation of Deductive Databases ∗ , 1986 .

[4]  Catriel Beeri,et al.  On the power of magic , 1987, J. Log. Program..

[5]  Jeffrey F. Naughton,et al.  Compiling separable recursions , 1988, SIGMOD '88.

[6]  Umeshwar Dayal,et al.  Traversal recursion: a practical approach to supporting recursive applications , 1986, SIGMOD '86.

[7]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[8]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[9]  Raghu Ramakrishnan,et al.  Performance Evaluation of Data Intensive Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[10]  Yehoshua Sagiv,et al.  Optimizing datalog programs , 1987, Foundations of Deductive Databases and Logic Programming..

[11]  Jeffrey F. Naughton,et al.  One-sided recursions , 1987, J. Comput. Syst. Sci..

[12]  Advances in Data Base Theory , 1984, Springer US.

[13]  Carlo Zaniolo,et al.  The Generalized Counting Method for Recursive Logic Queries , 1986, Theor. Comput. Sci..

[14]  J. Naughton,et al.  Counting methods for cyclic relations , 1988, PODS.

[15]  Chin-Liang Chang On Evaluation of Queries Containing Derived Relations in a Relational Data Base , 1979, Advances in Data Base Theory.

[16]  Lawrence J. Henschen,et al.  On compiling queries in recursive first-order databases , 1984, JACM.