MySQL Forums
Forum List  »  Performance

Simple JOIN is extremely slow.
Posted by: Patrick Stinson
Date: June 10, 2011 10:34AM

I am trying to do a simple UPDATE with a join and it takes about 23 minutes on a 2.66GHz (Ubuntu VirtualBox guest on Mac OS host) machine with plenty of ram. My CPU is otherwise free. Here's the query:

UPDATE reservations r
JOIN contacts c
ON r.CLIENT = c.breeze_id
r.contact_id =
WHERE r.contact_id IS NULL;

'reservations' has 7000 entries and 'contacts' has 146,000 entries, and the values in the ON clause are varchar(255).

Is there some weird mysql thing that I'm missing here? It seems like it should be much, much faster than that.

Options: ReplyQuote

Written By
Simple JOIN is extremely slow.
June 10, 2011 10:34AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.