About the optimizer's choice of access pathThe optimizer's choice of access path can depend on the number of
rows it will have to read. It tries to choose a path that requires the fewest
number of rows read. Access pathhow optimizer choosesIndex usehow optimizer chooses
For joins, the number of rows read also depends heavily on the join order
(discussed in .)
How does the optimizer know how many rows a particular access path will read?
Sometimes it knows exactly, and sometimes it has to make an educated guess. See
.