Query Rewriting and Search in CROQUE

In query optimization, a given query will be transformed by rewrite rules into an equivalent execution plan that is cheaper than the straightforwardly assigned plan according to some cost model. Finding the cheapest of all equivalent execution plans is a challenge since the rewriting of complex queries on the basis of a large set of rewriting rules may potentially span a very large space of equivalent plans. Consequently, one has to either use search strategies to explore (parts of) the search space or some heuristics to prune this space thus making it efficiently traversable. This paper presents the use of search strategies in the CROQUE project. The adaptation of some common strategies led to the development of a simple but powerful heuristics which is demonstrated by examples executed in the CROQUE prototype. The proposed heuristics can support any random-based search strategy or can be used stand-alone. It may be integrated seamlessly into most of the present query optimizers without almost any effort.

[1]  Torsten Grust,et al.  Incremental Updates for Materialized Views with User-Defined Functions , 1997, Grundlagen von Datenbanken.

[2]  A. Heuer,et al.  Query Optimization: on the Ordering of Rules , 1998 .

[3]  Torsten Grust,et al.  Query Evaluation in CROQUE - Calculus and Algebra Coincide , 1997, BNCOD.

[4]  Joachim Kröger,et al.  On the Ordering of Rewrite Rules (Extended Abstract) , 1998, ADBIS.

[5]  Tom Atwood,et al.  Object Database Standard: ODMG-93, Release 1.2 , 1995 .

[6]  Torsten Grust,et al.  Incremental Updates for Materialized OQL Views , 1997, DOOD.

[7]  David Maier,et al.  Specifying Rule-Based Query Optimizers in a Reflective Framework , 1993, DOOD.

[8]  R. G. G. Cattell,et al.  The Object Database Standard: ODMG-93 (Release 1.1) , 1994 .

[9]  Lawrence C. Paulson,et al.  ML for the working programmer (2. ed.) , 1996 .

[10]  James Hook,et al.  A Semantics of Compile-time Reflection , 1993 .

[11]  Guido Moerkotte,et al.  Optimizing Join Orders , 1993 .

[12]  Joachim Kröger,et al.  Query Optimization in the CROQUE Project , 1996, DEXA.

[13]  David J. DeWitt,et al.  The EXODUS optimizer generator , 1987, SIGMOD '87.

[14]  Goetz Graefe The Cascades Framework for Query Optimization , 1995, IEEE Data Eng. Bull..

[15]  Younkyung Cha Kang Randomized Algorithms for Query Optimization , 1991 .

[16]  Barry G. T. Lowden,et al.  Semantic Query Optimisation and Rule Graphs , 1998, KRDB.

[17]  Lalit M. Patnaik,et al.  Genetic Search: Analysis Using Fitness Moments , 1996, IEEE Trans. Knowl. Data Eng..

[18]  Guido Moerkotte,et al.  Query Optimization in Object Bases: Exploiting Relational Techniques , 1991, Query Processing for Advanced Database Systems.

[19]  Goetz Graefe,et al.  The Volcano optimizer generator: extensibility and efficient search , 1993, Proceedings of IEEE 9th International Conference on Data Engineering.

[20]  Robert Harper Introduction to standard ml , 1986 .

[21]  Eugene Wong,et al.  Query optimization by simulated annealing , 1987, SIGMOD '87.

[22]  Marc H. Scholl,et al.  A Formalization of ODMG Queries , 1997, DS-7.