[MDEV-29865] Optimizer chooses wrong path for big results Created: 2022-10-24 Updated: 2022-10-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.6.9, 10.10.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Oli Sennhauser | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | optimizer, sql_big_result, sql_small_result | ||
| Environment: |
Linux, n.a. |
||
| Attachments: |
|
| Description |
|
Optimizer chooses wrong way to execute GROUP BY for big results. The difference is dramatic. The documentation states: "The optimizer automatically knows if the result is too big, but you can force the optimizer to use a temporary table with SQL_SMALL_RESULT, or avoid the temporary table using SQL_BIG_RESULT."
10.6.9
10.10.1
It looks like the Optimizer is doing 50% more work in the default case... Test set is attached. For small results it seems OK:
I see some huge potential here for customers with huge GROUP BY... |