Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
ref+range access method is supposed to used with a multi-column index when major components are employed for ref access while a quite restrictive sargable condition is imposed on the remaining components.
Example:
create table t1 (a int,) |
create table t2 (a int, b int, c int, idx(a,b)) |
select count(*) from t1,t2 where t1.a=t2.a and b between (2,3) |
If the first component of idx is not too selective then it makes sense to use range scan for every value of t1.a for which there is a matching t2.a. The end points of such range scan will contain a variable equi-join part for the major component and a constant part for the remaining component. Every time when a match for t1.a=t2.a is found the range scan is executed with the major component set to the value of t1.a.
Attachments
Issue Links
- relates to
-
MDEV-4729 Combined ref and range access
- Open