Implementing an Interpreter for Functional Rules in a Query Optimizer
Mavis K. Lee, Johann Christoph Freytag, Guy M. Lohman · Very Large Data Bases · 1988
Query optimizers translate a high-level, user-submitted query into an efficient plan for executing that query, usually by estimating the execution cost of many different alternative plans. Existing implementations of these sophisticated but complex components of relational database management systems (DBMSS) typically embed the available strategies in the optimizer code, making them difficult to modify or enhance as improved strategies become available. In the last few years, interest in making DBMSs customizable for new application areas has magnified this need for flexible specification of execution strategies in a query optimizer. Several researchers have recently proposed query optimizers that are generated from rules for transforming plans into alternative plans. However, little progress has been reported on developing an implementation design that satisfies the requirements for high degrees of both flexibility and performance in an extensible query optimizer. This paper presents a design for implementing a query optimizer that interprets a new kind of compositional rules for specifying alternative execution strategies that are input to the optimizer as data. Modifications to these function-like rules do not necessitate re