Left Join extremely slow

wxdqz

New Member
Hi,
I had been using an INNER JOIN statement for a MySQL query, which worked fine. However, my new ISP does not have the latest version of MySQL. The version they have does not support conditions for Inner Join statements, so I have tried switching to a Left Join instead. However, the Left Join query takes 12.15 sec (which is obviously far too slow). The Inner join statement, meanwhile, completed the query in 0.04. Any idea why??

Here are the two statements (fast):

SELECT i.id, i.title, i.description FROM dir_items i INNER JOIN dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0

Here are the two statements (slow):

SELECT i.id, i.title, i.description FROM dir_items i LEFT JOIN dir_assoc a ON a.itemid=i.id WHERE a.parentid=59 AND a.ex=0
 
Back
Top