\section{Conclusion and future work} \label{sec:conclusion} Current rule-based query optimizers do not provide a very intuitive and conceptually streamlined framework to define rules and actions. Our experiences with the Volcano optimizer generator suggest that its model of rules and the expression of these rules is much more complicated and too low-level than it needs to be. As a consequence, rule sets in Volcano are fragile, hard to write, and debug. Similar problems may exist in other contemporary rule-based query optimizers. We believe that rule-based query optimizers will be standard tools of future database systems. The pragmatic difficulties of using existing rule-based optimizers led us to develop Prairie, an extensible and structured algebraic framework for specifying rules. Prairie is similar to existing optimizers in that it supports both transformation rules and implementation rules. However, Prairie makes several improvements: \begin{enumerate} \item it offers a conceptually more streamlined model for rule specification; \item rules are encapsulated, there are no ``hidden'' operators or ``hidden'' algorithms; \item implementation hints (\eg enforcers) are deduced automatically; \item and it has efficient implementations. \end{enumerate} We have explained how the first three points are important for simplifying rule specifications and making rule sets less brittle for extensibility. A consequence is that Prairie rules are simpler and more robust than rules of existing optimizers (\eg Volcano). We addressed the fourth point by building a P2V pre-processor which uses sophisticated algorithms to compose and compact a Prairie rule set into a Volcano rule set. To demonstrate the scalability of our approach, we rewrote the TI Open OODB rule set as a Prairie rule set, generated its Volcano counterpart, and showed that the performance of the synthesized Volcano rule set closely matches the hand-crafted Volcano rule set. Our future work will concentrate on developing higher-level abstractions using Prairie, including automatically generating Prairie rule sets, and combining multiple Prairie rule sets to automatically generate efficient optimizers. \section*{Acknowledgments} \label{sec:acknowledgments} We wish to thank Texas Instruments, Inc.\ for making the Open OODB source code available to us. Comments by Jos\'e Blakeley, Anne Ngu, Vivek Singhal, Thomas Woo and the anonymous referees greatly improved the quality of the paper.