MySQL Forums
Forum List  »  Optimizer & Parser

Re: Make this faster?
Posted by: Toa Sty
Date: January 05, 2007 08:45AM

Even if you don't specify an order by clause you'll often still see a filesort when grouping. You can sometimes specify 'order by null' to skip this sort. It might help. If it's using an index fully you should not need to do this though, so I suspect you're not fully using an index.

BTW It'd help a bit if you could post the show create table and explain each time, for example, if you've created the multi-col index on (month, year) but you're grouping by year,month it won't use the index.


My suspicion is that you'll see best performance if you create a multi-col index on (md5_key, red_year, red_month). If it's working as I expect you won't see a filesort when you explain.

Toasty

-----------------------------------------
email: 'toasty'*3 at gmail

Options: ReplyQuote


Subject
Views
Written By
Posted
3739
January 04, 2007 07:38AM
2270
January 04, 2007 10:21AM
2227
January 04, 2007 11:51AM
2337
January 04, 2007 03:34PM
2310
January 05, 2007 02:40AM
2233
January 05, 2007 05:07AM
2230
January 05, 2007 06:55AM
2263
January 05, 2007 08:31AM
2281
January 05, 2007 08:33AM
2446
January 05, 2007 08:45AM
2245
January 05, 2007 08:31AM
Re: Make this faster?
2286
January 05, 2007 08:45AM
2370
January 05, 2007 03:11PM
2267
January 08, 2007 02:44AM
2204
January 08, 2007 04:28AM
2247
January 08, 2007 04:41AM


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.