MySQL Forums
Forum List  »  Performance

Re: Query Slow
Posted by: Rick James
Date: October 10, 2013 09:50PM

Are you are asking about the horrible performance in the first query?
Well, the optimizer does a terrible job (until 5.6) with
... IN ( SELECT ... ) ...
It is almost always better to turn it into a JOIN.
(And you found a couple of other ways to optimize it.)

Options: ReplyQuote


Subject
Views
Written By
Posted
1611
October 08, 2013 12:25PM
850
October 08, 2013 12:34PM
Re: Query Slow
1679
October 10, 2013 09:50PM
790
October 11, 2013 07:31AM
917
October 12, 2013 01:24PM


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.