You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Generated column substitution | generate_column_substitute | Replaces eligible expressions with equivalent indexed virtual generated columns so that expression indexes can be used. |
23
-
| Column pruning | column_prune | Removes columns that are not needed by upper operators. This rule is executed twice during logical optimization. |
24
-
| Result reorder | result_reorder | Adds or completes ordering keys to make result ordering deterministic in special scenarios. |
25
-
| Build key information | build_keys | Derives unique key information for logical operators. |
23
+
| Column pruning | column_prune | Removes columns that are not needed by upper operators. |
26
24
| Decorrelate subquery | decorrelate | Rewrites correlated subqueries to non-correlated joins or aggregations when possible. |
27
25
| Semi join rewrite | semi_join_rewrite | Rewrites eligible `EXISTS` semi joins to inner joins with aggregation when the related hint or session variable is enabled. |
28
26
| Aggregation elimination | aggregation_eliminate | Removes unnecessary aggregation operators from the execution plan. |
@@ -33,19 +31,13 @@ Not every rule applies to every query. Some rules are effective only for specifi
33
31
| Convert outer joins to inner joins | convert_outer_to_inner_joins | Converts outer joins to inner joins when predicates filter out unmatched rows. |
34
32
| Predicate pushdown | predicate_push_down | Pushes predicates down to the operators that are closer to the data source. |
35
33
| Outer join elimination | outer_join_eliminate | Removes unnecessary left joins or right joins from the execution plan. |
36
-
| Partition pruning | partition_processor | Prunes partitions rejected by predicates and rewrites partitioned table queries to the `UnionAll + Partition DataSource` form. |
37
-
| Collect predicate columns point | collect_predicate_columns_point | Collects predicate columns and prunes access paths for later statistics loading. |
| Eliminate empty selection | eliminate_empty_selection | Removes `Selection` operators that have no remaining predicates. |
48
-
| Resolve expand | resolve_expand | Finalizes `Expand` projections for grouping sets and `ROLLUP` after earlier logical optimization finishes. |
49
41
50
42
### Disable optimization rules
51
43
@@ -55,7 +47,7 @@ You can use the blocklist of optimization rules to disable some of them if some
55
47
56
48
> **Note:**
57
49
>
58
-
> All the following operations need the `super privilege` privilege of the database. Each optimization rule has a name. For example, the name of column pruning is `column_prune`. The names of all optimization rules can be found in the second column of the table [Important optimization rules](#important-optimization-rules).
50
+
> All the following operations need the `super privilege` privilege of the database. Each optimization rule has a name. For example, the name of column pruning is `column_prune`. The rule names listed in [Important optimization rules](#important-optimization-rules) are shown in the second column.
59
51
60
52
- If you want to disable some rules, write its name to the `mysql.opt_rule_blacklist` table. For example:
0 commit comments