MySQL Forums
Forum List  »  Performance

Re: Query Slow
Posted by: Rick James
Date: October 12, 2013 01:24PM

Not a bug; a design deficiency.

Your other case probably performed well for other reasons.

The SELECT inside the IN is being performed once per time that it gets to the IN. Then the list of elements produced by the SELECT is linearly scanned.
So...
If you reach for the IN only a few times, and
If there are very few rows in the SELECT, then
the IN ( SELECT ... ) will seem to be fast.

Options: ReplyQuote


Subject
Views
Written By
Posted
1592
October 08, 2013 12:25PM
838
October 08, 2013 12:34PM
1596
October 10, 2013 09:50PM
783
October 11, 2013 07:31AM
Re: Query Slow
907
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.