MySQL Forums :: Performance :: Simple JOIN is extremely slow.


Advanced Search

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
SET
r.contact_id = c.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


Subject Views Written By Posted
Simple JOIN is extremely slow. 2234 Patrick Stinson 06/10/2011 10:34AM
Re: Simple JOIN is extremely slow. 755 Jørgen Løland 06/12/2011 11:50AM
Re: Simple JOIN is extremely slow. 650 Patrick Stinson 06/12/2011 03:24PM
Re: Simple JOIN is extremely slow. 727 Jørgen Løland 06/13/2011 12:25PM
Re: Simple JOIN is extremely slow. 1493 sudheer kumar 06/13/2011 12:07AM
Re: Simple JOIN is extremely slow. 799 Rick James 06/13/2011 11:01AM
Re: Simple JOIN is extremely slow. 654 Jørgen Løland 06/14/2011 06:49AM
Re: Simple JOIN is extremely slow. 770 Rick James 06/14/2011 08:04PM
Re: Simple JOIN is extremely slow. 827 Jørgen Løland 06/15/2011 01:16AM
Re: Simple JOIN is extremely slow. 688 Rick James 06/15/2011 07:38PM
Re: Simple JOIN is extremely slow. 683 Jørgen Løland 06/15/2011 11:42PM


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.