15.17.19. records_in_range
Purpose
For the given range how many records are estimated to be in this
range.
Synopsis
virtual ha_rows records_in_range
( |
inx, |
|
|
min_key, |
|
|
max_key) ; |
|
uint |
inx
; |
key_range * |
min_key
; |
key_range * |
max_key
; |
Description
This is the records_in_range
method.
Given a starting key, and an ending key estimate the number of
rows that will exist between the two. end_key may be empty which
in case determine if start_key matches any rows.
Used by optimizer to calculate cost of using a particular index.
Called from opt_range.cc by check_quick_keys().
Parameters
Return Values
Return the approxamite number of rows.
Usage
Determine an approxamite count of the rows between the key
values and return.
Default Implementation
{ return (ha_rows) 10; }