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

After BKA has filled join buffer, it should check again whether to use MRR

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 10.1
    • Component/s: None

      Description

      (filing based on discussions with Igor)

      The problem is: if one uses mrr_cost_based=ON, it is possible for the following
      to occur:

      1. The optimizer decides to use DS-MRR (or whatever MRR implementation the engine has)
      2. Execution starts
        1. The join buffer is filled, it turns out that it has fewer records then expected
        2. DS-MRR scan is used (according to the decision), but use of DS-MRR only adds overhead.

      The idea to address this is as follows: after BKA code has filled the join buffer, we should note the amount of data we have in the join buffer and check again whether to use DS-MRR.

      Tasks to be done

      • Fix the current DS-MRR cost choice formulas (or decide to use current ones)
      • Implement "the idea" described above.

      Unresolved questions

      • DS-MRR cost formulas (use current? take 5.6's? something else?)
      • Do we make the late-decision every time we've filled the join buffer? or just the first time?

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                psergey Sergei Petrunia
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: