[MDEV-26485] Add flexible optimizer hints support for every setting in the optimizer_switch and more Created: 2021-08-27 Updated: 2023-12-18 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 11.6 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Michael Widenius |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
MySQL 8 implemented hints that can be embedded into the query text (for example, in the view definition) and used to control every optimizer option available in the optimizer_switch for every table (among other hints). See https://dev.mysql.com/doc/refman/8.0/en/optimizer-hints.html for more details. I think we should do the same, as finding and fixing every place where SET STATEMENT ... FOR may help to get good plan for some problematic view is too complex to be practical. This was already discussed as a large project in MDEV-12980. |
| Comments |
| Comment by Valerii Kravchuk [ 2022-03-27 ] | |||
|
I wonder why it takes so much time to make a decision on this task? | |||
| Comment by Sergei Petrunia [ 2022-06-01 ] | |||
|
In MySQL: Hints use this syntax /*+ hint_text */ Hints are located at the beginning of query blocks or data statements:
There is a separate parser for hints. The common syntax is
the arguments depend on the hint. | |||
| Comment by Sergei Petrunia [ 2022-06-02 ] | |||
|
Notes from the optimizer call (most of the points by Monty)
| |||
| Comment by Sergei Petrunia [ 2023-06-27 ] | |||
|
ralf.gebhardt, I think this is 2 Dev Sprints. |