MySQL Forums
Forum List  »  Performance

Re: slow Subquery
Posted by: KimSeong Loh
Date: November 12, 2004 01:19AM

This might be better, the subquery will become independent of the main query and only need to be done once instead of for every row of the LARGE table.

SELECT *
FROM LARGE
WHERE L IN (SELECT S
FROM SMALL);

Try and see what does EXPLAIN gives you.

Options: ReplyQuote


Subject
Views
Written By
Posted
3347
November 12, 2004 12:32AM
2146
November 12, 2004 12:55AM
Re: slow Subquery
2278
November 12, 2004 01:19AM
2393
November 13, 2004 12:00AM
2664
November 14, 2004 01:23AM


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.