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

Transformation of queries with NOT IN predicands into queries with anti-joins

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Optimizer
    • None

    Description

      A query of the form
      SELECT * FROM t1 WHERE P1(t1) AND t1.a NOT IN (SELECT t2.a FROM t2 WHERE P2(t2,t1)
      can be transformed into the equivalent query
      SELECT * FROM t1 LEFT JOIN ON t1.a=t2.a AND P2(t2,t1) WHERE P1(t1)
      if t1.a is not nullable.

      After transformation a hash join algorithm can be employed when there is no indexes matching t2.a

      Attachments

        Activity

          People

            Unassigned Unassigned
            igor Igor Babaev
            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.