Complete cost-based optimization for ORDER BY with LIMIT
(MDEV-8306)
|
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | None |
| Fix Version/s: | 11.5 |
| Type: | Technical task | Priority: | Major |
| Reporter: | Varun Gupta (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 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 An example would be let say |
| Comments |
| Comment by Varun Gupta (Inactive) [ 2019-08-27 ] |
|
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. |
| Comment by Varun Gupta (Inactive) [ 2019-11-14 ] |
|
This has been implemented along with MDEV-8306, so it is in review |