The query-tree class shown in Chapter 12 forms the starting point for building the experimental-query optimization and execution engine for DBXP. In this chapter, I show you how to add the optimizer to the query-tree class. I begin by explaining the rationale for the heuristics (or rules) used in the optimizer and then jump into writing the code. Because the code for some of the functions is quite lengthy, the examples in this chapter are excerpts. If you are following along by coding the examples, download the source code for this chapter instead of typing in the code from scratch.
KeywordsEncapsulation Iterative Dynamic
Unable to display preview. Download preview PDF.
- 1.P. G. Selinger, M. M. Astraham, D. D. Chamberlin, R. A. Lories, and T. G. Price. 1979. “Access Path Selection in a Relational Database Management System”. Proceedings of the ACM SIGMOD International Conference on the Management of Data, Aberdeen, Scotland: 23–34. Considered by some to be the “Bible of Query Optimization.”Google Scholar
- 12.C. Lee, C. Shih, and Y. Chen. 2001. “A Graph-Theoretic Model for Optimizing Queries Involving Methods.” VLDB Journal 9:327–343.Google Scholar