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

take into account other conditions when estimating selectivity

    XMLWordPrintable

Details

    Description

      Say, the query is

      SELECT ... FROM t1, t2 WHERE t1_a=t2_b AND t1_c=10 AND t1_d=20

      When optimizer considers ref access for t1 using the index on t1_c, it uses records_in_range to estimate the number of rows that will be selected. But there is a second condition (on t1_d) and it will further limit the number of rows. Basically, the optimizer should understand that independently from the access method on t1 only those rows will be selected that match both conditions, and use this estimate, again, independently from the access method.

      Attachments

        Activity

          People

            Unassigned Unassigned
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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