Optimizer hint for disabling some logical optimization rules
Open
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Currently, if we want to forbid some logical optimization rules such as `decorrelate`, we need to add the rules into the system table `mysql.opt_rule_blacklist` as follows:
```
INSERT INTO mysql.opt_rule_blacklist VALUES ("decorrelate");
```
The above method has global scope. In real scenarios, disabling some optimization rule globally may cause regression for some queries, which is risky. In most cases we just want to disable some optimization rule for a specific query. Therefore, we want to introduce a optimizer hint for disabling some logical optimization rules, maybe like `/*+ disable_opt_rule(rule1 [, rule2 ...]) +/`.
Contributor guide
Assessment
This issue has not been assessed yet.