I would like to make sure that I understand the meaning of the
functions handler::scan_time and handler::read_time. Both are to be
estimates of the cost of doing some operations on a table.
handler::scan_time estimates the cost of doing a full table scan.
handler::read_time estimates the cost of reading some number of rows
from some number of ranges in an index (assumed to be a non-covering
The estimates requested are meant to be disk seeks.
I have gathered this from reading comments in different handler implementations.
The questions that I need help on are the following:
1) Is my understanding above accurate?
2) Does the absolute value returned affect the query plan, or is it
the relative value between these two functions?
For example, for some query, if it is the relative value between
these two functions that matter, then returning 100 in
handler::scan_time and 90 in handler::read_time should have same
effect as returning 200 in handler::scan_time and 180 in
handler::read_time. However, if the absolute value returned may affect
the query plan, then returning 200 instead of 100 in
handler::scan_time (or 180 vs. 90 in handler::read_time) may cause the
query planner to behave differently.