[MDEV-19153] Support ref+range access method Created: 2019-04-03  Updated: 2019-11-28

Status: Open
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: None

Type: Task Priority: Major
Reporter: Igor Babaev Assignee: Igor Babaev
Resolution: Unresolved Votes: 1
Labels: 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.



 Comments   
Comment by Arnaud Adant [ 2019-04-30 ]

See this bug in MySQL : https://bugs.mysql.com/bug.php?id=95200

Generated at Thu Feb 08 08:49:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.