List:General Discussion« Previous MessageNext Message »
From:Rob Wultsch Date:April 11 2008 4:07pm
Subject:Re: Two MySql servers, but very different performances for a SELECT JOIN
View as plain text  
2008/4/11  <tmarly@stripped>:
> Hi,
>
>  I have 2 MySql server instances. One which is 5.0.27/Debian, another
>  5.0.32/Solaris.
>
>  Both instances have the same data in the database.
>
>  And I'm doing a select:
>  SELECT media.* FROM media,country,content WHERE country.id='Germany' AND
>  country.detail_tid=content.tid AND content.id=media.content_id;
>
>  This  request takes less than a half second on one server, and takes 70 seconds
>  on another server.
>
>  The EXPLAIN results are attached to this mail. Its shows that there are
>  interpreted very differently on each server.
>
>  I checked the database structure, wich is exactly identical on both instance.
>
>  Moreover, one could think that this is the optimizer which does not interpret
>  the joint request in the right order in the version 5.0.32 compared to 5.0.27,
>  but I'm pretty sure that this application had worked in the past (good
>  performance on 5.0.27).
>
>  Do you know how could I found some clues ?

Shot in the dark, run
ANALYZE TABLE
on all the relevant tables on the slow server. If you just imported
them the indexes may not be well distributed. Please post ddl and
relevant SHOW INDEX info.

-- 
Rob Wultsch
wultsch@stripped
wultsch (aim)
Thread
Two MySql servers, but very different performances for a SELECT JOINtmarly11 Apr
  • Re: Two MySql servers, but very different performances for a SELECT JOINRob Wultsch11 Apr
  • Re: Two MySql servers, but very different performances for a SELECTJOINTristan Marly13 Apr
    • Re: Two MySql servers, but very different performances for a SELECTJOINSebastian Mendel14 Apr
Re: Two MySql servers, but very different performances for a SELECT JOINtmarly15 Apr
  • Re: Two MySql servers,but very different performances for a SELECT JOINWm Mussatto15 Apr
    • Re: Two MySql servers, but very different performances for a SELECT JOINRob Wultsch15 Apr
  • Re: Two MySql servers, but very different performances for a SELECT JOINtmarly16 Apr
    • Re: Two MySql servers, but very different performances for a SELECT JOINRob Wultsch16 Apr
      • Re: Two MySql servers, but very different performances for a SELECT JOINtmarly16 Apr