[MDEV-6214] After BKA has filled join buffer, it should check again whether to use MRR Created: 2014-05-06  Updated: 2015-10-30

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Sergei Petrunia Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: optimizer, tentative


 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?

Generated at Thu Feb 08 07:10:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.