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

Take into account the cost of subqueries during optimization

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      When computing the cost of any query plan the optimizer should take into account the cost of subquery predicates. Currently plan costs are computed with the assumption that all rows read by a plan belong to the tables contained directly in the plan (that is, the tables from all JOIN_TABs).

      However, if a query plan contains subquery predicates, the evaluation
      of these predicates contributes to the total cost and number of examined rows of the outer plan.

      Not taking into account the additional cost of nested subqueries results in underestimating the cost of various execution methods.

      For instance, for Q20 from DBT3 currently the optimizer chooses materialization instead of a much more efficient semi-join (when combined with mdev-83).

      Attachments

        Issue Links

          Activity

            People

              timour Timour Katchaounov (Inactive)
              timour Timour Katchaounov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.