List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:October 8 2009 8:58am
Subject:Re: understanding handler::read_time and handler::scan_time
View as plain text  
Hi, Zardosht!

On Oct 07, Zardosht Kasheff wrote:
> I realize this may be difficult to answer, but any examples on when
> absolute values matter?

You mean queries ?
I actually only looked at the code, there are places like

      tmp= s->table->file->scan_time();
      tmp= record_count *
         (tmp +
          (s->records - rnd_records)/(double) TIME_FOR_COMPARE);

here a normalized number of records is added to scan_time(),

      index_scan_time= select_limit/rec_per_key *
                       min(rec_per_key, table->file->scan_time());

here scan_time() is compared with rec_per_key,

    scan_time= (double) records / TIME_FOR_COMPARE + 1;
    read_time= (double) head->file->scan_time() + scan_time + 1.1;

here, again, it's added to the normalized number of records.

Regards / Mit vielen Grüßen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
/_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB München 161028
       <___/                  Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring
Thread
understanding handler::read_time and handler::scan_timeZardosht Kasheff7 Oct
  • Re: understanding handler::read_time and handler::scan_timeSergei Golubchik7 Oct
    • Re: understanding handler::read_time and handler::scan_timeZardosht Kasheff7 Oct
      • Re: understanding handler::read_time and handler::scan_timeZardosht Kasheff8 Oct
        • Re: understanding handler::read_time and handler::scan_timeMichael Widenius8 Oct
        • Re: understanding handler::read_time and handler::scan_timeSergei Golubchik8 Oct
          • Re: understanding handler::read_time and handler::scan_timeZardosht Kasheff8 Oct
            • Re: understanding handler::read_time and handler::scan_timeSergei Golubchik8 Oct
      • Re: understanding handler::read_time and handler::scan_timeSergei Golubchik8 Oct
      • Re: understanding handler::read_time and handler::scan_timeMichael Widenius8 Oct