MySQL Forums
Forum List  »  Optimizer & Parser

Re: Desperate: BETWEEN and ORDER BY on different columns
Posted by: Jørgen Løland
Date: September 01, 2011 06:12AM

I see.

Well, I'm afraid you have the choice between
* reading only the relevant range and sort those rows, or
* get ordering for free but also read rows not in the range.

Teaser: you can look forward to Index Condition Pushdown in the MySQL 5.6 release. That would probably help you quite a bit if you add an index on (rnd,birthdate).

ICP explained:
http://olavsandstaa.blogspot.com/2011/04/mysql-56-index-condition-pushdown.html

Hope this helps,
Jørgen Løland
Software Engineer, MySQL, Oracle
jorgenloland.blogspot.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Desperate: BETWEEN and ORDER BY on different columns
1244
September 01, 2011 06:12AM


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.