
Chapter 5
Designing a Cost Model
As we discussed in previous chapters, physical database design can be seen as
a complex search problem over a potentially very large space of feasible con-
figurations. Although there are different approaches to conducting this search
(we discuss different alternatives in Chapter 6), a common requirement of any
solution is the ability to evaluate the expected cost of a query under a given
candidate configuration in the search space. In Section 3.2.2 we discussed why
early designs, which were based on a cost model outside of the query opti-
mizer, cannot be trusted and in general produce undesirable results. At the
same time, ...