Details

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

    Description

      Currently in the code where we pick the best join order (the funtion is best_extension_by_limited_search), there are ways in which we do pruning so that we don't need to go through all the possible combinations of join order. There are 2 cases currently

      1) Partial plan pruned by the cost of the best plan

      2) Partial plan is pruned by another partial plan at the same level (this happens when we set optimizer_prune_level =1).

      Case 1 is not a problem when we consider the join order that takes case of the ordering
      Case 2 is a problem because the partial plan got pruned but maybe after the ordering is achieved and limit would shortcut the rest of the execution we could get a better plan, the cases are not considered.

      An example would be
      Tables: t1,t2,t3
      For sorting you need t1,t3

      let say
      t1,t2 pruned t1,t3 by case 2, then we would not be able to consider the case of putting a nest around t1,t3. that is order_nest<t1,t3>, t2 would not be considered.

      Attachments

        Activity

          The approach used here is that we set optimizer_prune_level = 0 for the queries that have order by limit. So this would help us not pruning any partial plans and the plans would only be pruned by the cost of the best plan.

          varun Varun Gupta (Inactive) added a comment - The approach used here is that we set optimizer_prune_level = 0 for the queries that have order by limit. So this would help us not pruning any partial plans and the plans would only be pruned by the cost of the best plan.

          This has been implemented along with MDEV-8306, so it is in review

          varun Varun Gupta (Inactive) added a comment - This has been implemented along with MDEV-8306 , so it is in review

          People

            psergei Sergei Petrunia
            varun Varun Gupta (Inactive)
            Votes:
            0 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.