nice :) maybe part of msql? :) very old times

nice, i will stay updated with this gson project, very interesting and a very good work :) 


2014-05-27 15:35 GMT-03:00 Sergei Golubchik <serg@mariadb.org>:
Hi, Roberto!

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?

Yes, the handler methods are:

  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




--
Roberto Spadim
SPAEmpresarial
Eng. Automação e Controle