[SDBUG] Mysql 5.0 Performance!!!

Ben Lovett blovett at tilderoot.com
Thu Apr 2 21:49:39 PDT 2009


On Thu, Apr 2, 2009 at 7:49 PM, Pedro Moreno <pmoreno at oakwest.com> wrote:

> This module receive the info from a bardcode "0000000266200063", then do
> all the stuff.
>    Every time that reach the "SELECT * FROM vDetalleCargaRegistrado WHERE
> CargaID=13" I see this:
>    Copying to tmp table
>    Is copying the view data to some tmp_table, this is where bottleneck is,
> my cpu goes to 50 ID for a while, the user time is the one who eat all that
> CPU power.
>      Exist about 4 views that have this behavior, the developer is checking
> each one to see if he made a mistake or something to tuneup, my part is to
> tuneup mysql for freebsd, I play all this morning with mysql, read a lot of
> pages about how to fix this.
>    I still don't understand the views, but went I see the server, is like
> each time is reading the 1220 records and saving in that tmp table, I'm
> wrong ?
>

Look at what comes back from "explain select <your expensive query>". It's
possible you don't have indexes where you should..

There's a book written by the guys that write the MySQL Performance Blog [
mysqlperformanceblog.com], called "High Performance MySQL" [
http://www.amazon.com/dp/0596101716] that I found particularly helpful.

Good luck!

Ben


More information about the SDBUG mailing list