[MDEV-31356] Range cost calculations does not take into acount join_buffer Created: 2023-05-26 Updated: 2023-06-18 Resolved: 2023-06-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 11.0 |
| Fix Version/s: | 11.0.3, 11.1.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Michael Widenius | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Range cost cost calculations does not take into account join_buffer. When 11.0 optimizer was coded, the assumption was that RANGE queries will not use the join buffer (and join buffer flag was not set for these). The task is to fix that range + join_buffer cost is calculated correctly. This is a bit complex to do as the 'range total cost' that best_access_plan() is not specific |
| Comments |
| Comment by Michael Widenius [ 2023-06-07 ] |
|
This patch also fixes Cost changes caused by this change:
The big change in the patch are:
One of effect if this change is that when joining very small tables: t1 some_access_method This is swiched to t1 some_access_method Both plans has the same cost, but as table scan in this case has less Test case changes:
|