MySQL Forums
Forum List  »  Performance

Re: Join by date range unacceptably slow
Posted by: Øystein Grøvlen
Date: May 19, 2017 03:15AM


I do not have very high hopes, but you try to see what happens if you do FORCE INDEX(ix_start_end) or FORCE INDEX(ix_end_start). The current plan is to decide on which index to use for every execution of the subquery. (That is what "Range checked for each record" refers to).

The inherent problem with these queries is that you have two conditions which each are, on average, satisfied 50% of the rows. Since the conditions are on different columns, we need to pick one of them for index access.

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote

Written By
Re: Join by date range unacceptably slow
May 19, 2017 03:15AM

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.