MySQL Forums
Forum List  »  Optimizer & Parser

Re: Desperate: BETWEEN and ORDER BY on different columns
Posted by: Joachim Berger
Date: September 05, 2011 01:03AM

Hi Rick,

thanks for the answer. The problem with the last example (the one with the 'bulky' fields) is that it's still using filesort for the result table (<derived2>).

I don't know if it's better to indeed have a filesort here, or just have a less selective index on just (sex, rnd) and do the "WHERE birthdate..." part in the outer query. In this case, no filesort is being used, but more rows are returned of course.

Any suggestions?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Desperate: BETWEEN and ORDER BY on different columns
1225
September 05, 2011 01:03AM


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.