Efficient Processing of Queries Containing User-Defined Predicates

Query optimizers often have difficulties with the treatment of user-defined functions. In particular, the optimization of joins involving complex, user-defined predicates rather than just simple arithmetic comparisons may lead to query plans of poor quality. In this paper, we identify a class of user-defined functions that can be included in queries in such a way that efficient query optimization is still possible. For this class of functions, a join between two sets R and S, for example, could still be computed in time significantly less than O(¦R¦ · ¦S¦). To achieve this goal we introduce the concept of the φ-function, an operator to process each set separately with respect to the user-defined function(s) being used. These φ-functions dynamically derive information to constrain subsequent processing steps. The derived information allows in particular the application of an existing index or some other traditional join strategy. After demonstrating this technique on various examples, we present the results of a practical performance evaluation.

[1]  Stanley B. Zdonik,et al.  A query algebra for object-oriented databases , 1990, [1990] Proceedings. Sixth International Conference on Data Engineering.

[2]  Michael Stonebraker,et al.  Readings in Database Systems , 1988 .

[3]  Carlo Zaniolo,et al.  The database language GEM , 1983, SIGMOD '83.

[4]  David Maier,et al.  Query Optimization in Object-Oriented Database Systems: A Prospectus , 1988, OODBS.

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

[6]  Elisa Bertino,et al.  Object-Oriented Database Systems , 1993 .

[7]  François Bancilhon,et al.  A Query Language for O2 , 1992, Building an Object-Oriented Database System, The Story of O2.

[8]  Kyuseok Shim,et al.  Query Optimization in the Presence of Foreign Functions , 1993, VLDB.

[9]  Karen A. Frenkel,et al.  The human genome project and informatics , 1991, CACM.

[10]  Michael Stonebraker,et al.  The design of POSTGRES , 1986, SIGMOD '86.

[11]  Michael Stonebraker,et al.  Predicate migration: optimizing queries with expensive predicates , 1992, SIGMOD Conference.

[12]  Jeffrey D. Ullman,et al.  Principles Of Database And Knowledge-Base Systems , 1979 .

[13]  David J. DeWitt,et al.  The Object-Oriented Database System Manifesto , 1994, Building an Object-Oriented Database System, The Story of O2.

[14]  John Riedl,et al.  Generalized suffix trees for biological sequence data: applications and implementation , 1994, 1994 Proceedings of the Twenty-Seventh Hawaii International Conference on System Sciences.

[15]  Gottfried Vossen,et al.  Query Processing for Advanced Database Systems , 1993 .

[16]  David Maier,et al.  Challenges for Query Processing in Object-Oriented Databases , 1991, Query Processing for Advanced Database Systems.

[17]  Joseph M. Hellerstein,et al.  Practical predicate placement , 1994, SIGMOD '94.

[18]  Oliver Günther,et al.  Processing Joins with User-Defined Functions , 1994, Grundlagen von Datenbanken.

[19]  Guido Moerkotte,et al.  Function materialization in object bases , 1991, SIGMOD '91.