MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimize sub query with large group by
Posted by: Rick James
Date: March 14, 2011 06:31PM

GROUP BY object_id -- yet you nowhere else do you mention object_id.

The group-by-trick depends on the inner query having an order by -- that way the GROUP BY at the next level can pick the right row, namely the 'first' row in each grouping.

Another topic to study is "compound indexes".

Options: ReplyQuote


Subject
Views
Written By
Posted
3852
March 10, 2011 07:44PM
Re: Optimize sub query with large group by
1621
March 14, 2011 06:31PM


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.