Query execution techniques for caching expensive methods
- 1 June 1996
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGMOD Record
- Vol. 25 (2) , 423-434
- https://doi.org/10.1145/235968.233359
Abstract
Object-Relational and Object-Oriented DBMSs allow users to invoke time-consuming ("expensive") methods in their queries. When queries containing these expensive methods are run on data with duplicate values, time is wasted redundantly computing methods on the same value. This problem has been studied in the context of programming languages, where "memoization" is the standard solution. In the database literature, sorting has been proposed to deal with this problem. We compare these approaches along with a third solution, a variant of unary hybrid hashing which we call Hybrid Cache. We demonstrate that Hybrid Cache always dominates memoization, and significantly outperforms sorting in many instances. This provides new insights into the tradeoff between hashing and sorting for unary operations. Additionally, our Hybrid Cache algorithm includes some new optimization for unary hybrid hashing, which can be used for other applications such as grouping and duplicate elimination. We conclude with a discussion of techniques for caching multiple expensive methods in a single query, and raise some new optimization problems in choosing caching techniques.Keywords
This publication has 10 references indexed in Scilit:
- Cost-based optimization for magicPublished by Association for Computing Machinery (ACM) ,1996
- Practical predicate placementPublished by Association for Computing Machinery (ACM) ,1994
- Optimizing disjunctive queries with expensive predicatesPublished by Association for Computing Machinery (ACM) ,1994
- Query evaluation techniques for large databasesACM Computing Surveys, 1993
- Predicate migrationPublished by Association for Computing Machinery (ACM) ,1993
- Magic is relevantPublished by Association for Computing Machinery (ACM) ,1990
- Statistical estimators for relational algebra expressionsPublished by Association for Computing Machinery (ACM) ,1988
- Multiple-query optimizationACM Transactions on Database Systems, 1988
- Implementation techniques for main memory database systemsPublished by Association for Computing Machinery (ACM) ,1984
- Access path selection in a relational database management systemPublished by Association for Computing Machinery (ACM) ,1979