MySQL Forums
Forum List  »  Optimizer & Parser

Re: How to optimize the "order by" & "limit" query?
Posted by: Toa Sty
Date: January 04, 2007 10:25AM

An index on e.id should make your 4 second query take about the same as the other one, or ever so slightly slower.

(Using very high limit values like this is never super quick though, because mysql basically scans and throws away the first 499990 rows in your case. It's much better if you could say 'where someIndexedUID >= 499990' limit 10)

Toasty

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

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to optimize the "order by" & "limit" query?
2254
January 04, 2007 10:25AM


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.