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

Range Analyzer should tell whether range is looser than the source condition

    XMLWordPrintable

Details

    Description

      (filed based on discussions with Igor)
      Cost estimation code makes use of range analyzer to match (parts of) the WHERE
      condition against column's Histogram.

      Some other module (todo: which? MDEV#?) needs to know whether the estimate is
      precise or not.

      The main source of imprecision is that some of conditions are not [fully]
      sargable. That is, range analyzer produces ranges that are wider than the
      supplied conditions.

      Examples of conditions with imprecise estimates:

        t.col < 10 AND t.col MOD 3 = 2 
        t.col LIKE 'foo%bar%'

      Examples of conditions with precise estimates:

        t.col LIKE 'foo%'
        t.col < 3214
        t.col = 'bar'
        t.col IN (1,2,3) OR t.col BETWEEN 10 AND 20

      (TODO: we don't need to handle the case of multi-column range analysis, do we?)

      Attachments

        Activity

          People

            Unassigned Unassigned
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.