MySQL Forums
Forum List  »  Optimizer & Parser

Re: Help with optimizing GROUP BY query
Posted by: KimSeong Loh
Date: June 12, 2006 01:01PM

Then a full table scan may just be the most efficient way to do it, just make sure you have a big enough sort_buffer.

A full table scan that reads the disk sequentially can be much faster than random access read the rows in sorted order.

Alternative is to use a covering index since you only needs the 2 column userid and score, assuming there are a lot of other columns which will not be useful in this query.

Options: ReplyQuote


Subject
Views
Written By
Posted
5065
June 12, 2006 07:16AM
2445
June 12, 2006 10:54AM
Re: Help with optimizing GROUP BY query
2456
June 12, 2006 01:01PM


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.