Predicate migration
Authors:
Open Access
- 1 June 1993
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM SIGMOD Record
- Vol. 22 (2) , 267-276
Abstract
The traditional focus of relational query optimization schemes has been on the choice of join methods and join orders. Restrictions have typically been handled in query optimizers by “predicate pushdown” rules, which apply restrictions in some random order before as many joins as possible. These rules work under the assumption that restriction is essentially a zero-time operation. However, today's extensible and object-oriented database systems allow users to define time-consuming functions, which may be used in a query's restriction and join predicates. Furthermore, SQL has long supported subquery predicates, which may be arbitrarily time-consuming to check. Thus restrictions should not be considered zero-time operations, and the model of query optimization must be enhanced. In this paper we develop a theory for moving expensive predicates in a query plan so that the total cost of the plan — including the costs of both joins and restrictions — is minimal. We present an algorithm to implement the theory, as well as results of our implementation in POSTGRES. Our experience with the newly enhanced POSTGRES query optimizer demonstrates that correctly optimizing queries with expensive predicates often produces plans that are orders of magnitude faster than plans generated by a traditional query optimizer. The additional complexity of considering expensive predicates during optimization is found to be manageably small.Keywords
This publication has 13 references indexed in Scilit:
- Efficient sampling strategies for relational database operationsTheoretical Computer Science, 1993
- Extensible/rule based query rewrite optimization in Starburst1992
- The Iris architecture and implementationIEEE Transactions on Knowledge and Data Engineering, 1990
- The story of O/sub 2/IEEE Transactions on Knowledge and Data Engineering, 1990
- Starburst mid-flight: as the dust clears (database project)IEEE Transactions on Knowledge and Data Engineering, 1990
- Statistical estimators for relational algebra expressions1988
- On the optimal nesting order for computing N -relational joinsACM Transactions on Database Systems, 1984
- Access path selection in a relational database management system1979
- An optimal evaluation of Boolean expressions in an online query systemCommunications of the ACM, 1977
- Various optimizers for single‐stage productionNaval Research Logistics Quarterly, 1956