Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19153

Support ref+range access method

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Optimizer
    • 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

          Activity

            People

              igor Igor Babaev
              igor Igor Babaev
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.