Re: Fails to use range index in outer joined table
The MySQL's range optimizer can not handle ref access, only range access. In your second example, where adid is constant, the entire range is known at optimize time, and the range optimizer will find that the index can be used to cover the entire range. In the original example, where the range will vary for each access of table2, MySQL will not consider this kind of optimization.
Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway
Subject
Views
Written By
Posted
3467
May 25, 2011 10:01AM
1111
May 26, 2011 09:27PM
1108
May 27, 2011 01:51AM
Re: Fails to use range index in outer joined table
1175
May 27, 2011 06:14AM
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.