MySQL Forums
Forum List  »  Performance

Re: in (id_1,id_2, ...) or more select statements or
Posted by: matthew crowley
Date: December 09, 2004 11:18AM

Do the join. As long as your tables are indexed properly, this should return VERY fast. Be careful about the limit statement when doing joins or grouping. In some databases, not necessarily mysql, limiting the rows returned can sometimes give you unexpected results. I would pull the entire result into an array, and only show the first 20, next 20 like that. If your result set is huge, consider just looping through the rows as they come back and only storing the ones you want in an array.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: in (id_1,id_2, ...) or more select statements or
1937
December 09, 2004 11:18AM


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.