for selecting the best strategy prevents users from choosing strategies that are known to be
inefficient and gives the DBMS more control over system performance.
There are two main techniques for query optimization, although the two strategies are
usually combined in practice. The first technique uses heuristic rules that order the operations
in a query. The other technique compares different strategies based on their relative
costs and selects the one that minimizes resource usage. Since disk access is slow compared
with memory access, disk access tends to be the dominant cost in query processing
for a centralized DBMS, and it is the one that we concentrate on exclusively in this chapter
when providing cost estimates.