Efficient Optimization of Iterative Queries

This paper presents a new query algebra based on fold iterations that facilitates database implementation. An algebraic normalization algorithm is introduced that reduces any program expressed in this algebra to a canonical form that generates no intermediate data structures and has no more nested iterations than the initial program. Given any inductive data type, our system can automatically synthesize the definition of the fold operator that traverses instances of this type, and, more importantly, it can produce the necessary transformations for optimizing expressions involving this fold operator.

[1]  Leonidas Fegaras A Transformational Approach to Database System Implementation , 1993 .

[2]  Catriel Beeri,et al.  Algebraic Optimization of Object-Oriented Query Languages , 1990, Theor. Comput. Sci..

[3]  Patricia G. Selinger,et al.  Access path selection in a relational database management system , 1979, SIGMOD '79.

[4]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1990, Theor. Comput. Sci..

[5]  Tim Sheard,et al.  A fold for all seasons , 1993, FPCA '93.

[6]  Nathan Goodman,et al.  On the translation of relational queries into iterative programs , 1989, TODS.

[7]  John Darlington,et al.  A system which automatically improves programs , 1973, Acta Informatica.

[8]  Peter Buneman,et al.  Structural Recursion as a Query Language , 1992, DBPL.

[9]  Stephen A. Cook,et al.  A new recursion-theoretic characterization of the polytime functions (extended abstract) , 1992, STOC '92.

[10]  Grant Malcolm Homomorphisms and Promotability , 1989, MPC.

[11]  David W. Stemple,et al.  Uniform Traversal Combinators: Definition, Use and Properties , 1992, CADE.

[12]  Wei-Ngan Chin Safe fusion of functional expressions , 1992, LFP '92.

[13]  David W. Stemple,et al.  Using type transformation in database system implementation , 1992 .

[14]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[15]  Olivier Danvy,et al.  Tutorial notes on partial evaluation , 1993, POPL '93.

[16]  Maarten M. Fokkinga,et al.  Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire , 1991, FPCA.

[17]  Z. Meral Özsoyoglu,et al.  Design and Implementation of a Semantic Query Optimizer , 1989, IEEE Trans. Knowl. Data Eng..