List:Internals« Previous MessageNext Message »
From:Sasha Pachev Date:December 7 2000 4:44pm
Subject:Re: MySQL protocol efficiency
View as plain text  
Od
>bruce> Now for another question.  It is possibly related the points above. 
>bruce> What is the overhead of parsing a SQL query from a string into it's 
>bruce> intermediate format (the format that the server uses to process
>bruce> the query)?  
>
>MySQL has a very fast parser, but it's still and overhead.  For most
>queries it's neglectable just because the query takes so long to
>execute, but for simple things it's can be up 1-10 % of the total
>time.  Another win is that if the server can get the strings
>'unescaped', we can save memory as we don't need to save a copy of the
>unescaped string argument but can use a pointer to the original string!
>

You can get an idea of the parser speed + intialization overhead from the 
following benchmark:

A single CPU Pentium 500 running Linux performs 6000 trivial ( SELECT 1) 
queries per second. The same machine can perform 2800 indexed selects 
returning one row of 25 bytes per second on a 2.8 MB table containing 45,000 
rows. At some point, I want to break everything down and benchmark each 
syscall and function individually to see how the time is distributed.


-- 
MySQL Development Team
   __  ___     ___ ____  __ 
  /  |/  /_ __/ __/ __ \/ /   Sasha Pachev <sasha@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Provo, Utah, USA
       <___/                  
Thread
MySQL protocol efficiencybruce7 Dec
  • MySQL protocol efficiencyMichael Widenius7 Dec
    • Re: MySQL protocol efficiencybruce7 Dec
      • Re: MySQL protocol efficiencyMichael Widenius7 Dec
        • Re: MySQL protocol efficiencySasha Pachev7 Dec