MySQL Forums
Forum List  »  Newbie

Re: [SQL] Left join order
Posted by: laptop alias
Date: July 07, 2009 04:36AM

The dataset's too small to provide a definitive answer, but you probably want one of the range of 'within group quotas', 'groupwise max' or 'TopN' queries discussed ad nauseam here and elsewhere.

See

http://www.artfulsoftware.com/infotree/queries.php?&bw=1280#104

or

http://jan.kneschke.de/projects/mysql/groupwise-max

or even the manual at

http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html

In my (limited) experience, on large datasets, the 'uncorrelated subquery' method is fastest.

Options: ReplyQuote


Subject
Written By
Posted
July 07, 2009 04:25AM
Re: [SQL] Left join order
July 07, 2009 04:36AM


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.