List:General Discussion« Previous MessageNext Message »
From:Devananda Date:September 21 2005 5:50pm
Subject:Re: Bad MySQL performance with LEFT JOINS in combination with BIGINT(16)
Keys
View as plain text  
Christofer Dutz wrote:
> Hi,
> 
> I just ran into a very strange problem. I have two simple tables with 
> BIGINT(16) PKs. The primary table has 7500 records and the secondars has 
> 15000. If I execute:
> 
> SELECT * FROM lad JOIN snd ON lad.id = snd.lad_id
> 
> The query takes 8 seconds. If I execute this one:
> 
> SELECT * FROM lad LEFT JOIN snd ON lad.id = snd.lad_id
> 
> I quit the query after 5 minutes.
> 
> Why is this so?
> 
> Chritofer Dutz
> 

Christofer,

You'll need to provide the list with more information for anyone to be 
able to help you. What version of MySQL are you running? Can you paste 
the output of "show create table snd; show create table lad;" Also, do 
you have other processes using the server that could have locked one of 
the tables? When the query is taking a long time, try opening a second 
connection to the server and running "show full processlist;" to see 
what else is going on.


Regards,
Devananda vdv
Thread
Bad MySQL performance with LEFT JOINS in combination with BIGINT(16)KeysChristofer Dutz21 Sep
  • Re: Bad MySQL performance with LEFT JOINS in combination with BIGINT(16)KeysDevananda21 Sep
    • Re: Bad MySQL performance with LEFT JOINS in combination with BIGINT(16)KeysChristofer Dutz21 Sep
      • Re: Bad MySQL performance with LEFT JOINS in combination with BIGINT(16)KeysAlexey Polyakov21 Sep