Hi, Roberto!
Yes, the handler methods are:
On May 27, Roberto Spadim wrote:
> Hi Sergei!
> nice :) i'm reading about it
> just one doubt i didn't understand everything yet
> there's a read time and a scan time, what the difference? read = sequencial
> read and scan = non sequencial read? or something like table read cost,
> index read cost?
virtual double handler::scan_time()
{ return stats.data_file_length / IO_SIZE + 2; }
virtual double handler::read_time(uint index, uint ranges, ha_rows rows)
{ return ranges+rows; }
these are the default implementations, in the base handler class. Method
names are historical and *very* old.
The return values are kind of "number of disk seeks". You can see that
scan_time() assumes a sequential disk read of blocks of IO_SIZE bytes.
While read_time() assumes random reads of 'rows' rows from the data
file and 'ranges' ranges from the index.
These default implementations, I suspect, predate even MyISAM.
Regards,
Sergei