Skip to content

Commit 4779f32

Browse files
committed
doc: trim internal optimizer rules from blocklist table
1 parent f80079f commit 4779f32

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

blocklist-control-plan.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ The blocklist of optimization rules is one way to tune optimization rules, mainl
1313

1414
### Important optimization rules
1515

16-
The following table lists the optimization rules that can be controlled by the blocklist and their corresponding rule names.
16+
The following table lists common optimization rules that can be controlled by the blocklist and their corresponding rule names.
1717

1818
Not every rule applies to every query. Some rules are effective only for specific query patterns, SQL features, hints, or session variables.
1919

2020
|**Optimization Rule**|**Rule Name**|**Description**|
2121
| :--- | :--- | :--- |
2222
| 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. |
2624
| Decorrelate subquery | decorrelate | Rewrites correlated subqueries to non-correlated joins or aggregations when possible. |
2725
| 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. |
2826
| 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
3331
| Convert outer joins to inner joins | convert_outer_to_inner_joins | Converts outer joins to inner joins when predicates filter out unmatched rows. |
3432
| Predicate pushdown | predicate_push_down | Pushes predicates down to the operators that are closer to the data source. |
3533
| 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. |
34+
| Partition pruning | partition_processor | Prunes partitions rejected by predicates. |
3835
| Aggregation pushdown | aggregation_push_down | Pushes aggregations down to their children. |
3936
| Derive TopN or Limit from window functions | derive_topn_from_window | Derives `TopN` or `Limit` operators from window functions. |
4037
| Predicate simplification | predicate_simplification | Simplifies predicates by consolidating ranges and removing impossible branches. |
4138
| TopN pushdown | topn_push_down | Pushes the `TopN` operator closer to the data source. |
42-
| Sync wait stats load point | sync_wait_stats_load_point | Waits for synchronous statistics loading before later cost-sensitive optimization stages continue. |
4339
| Join reorder | join_reorder | Decides the order of multi-table joins. |
4440
| Outer join to semi join rewrite | outer_join_to_semi_join | Rewrites eligible outer join plus `IS NULL` patterns to anti semi joins. |
45-
| Push down sequence | push_down_sequence | Pushes `LogicalSequence` nodes down the logical plan when possible. |
46-
| Eliminate empty `UnionAll` branches | union_all_eliminate_dual_item | Removes empty `TableDual` branches from `UnionAll` plans. |
47-
| 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. |
4941

5042
### Disable optimization rules
5143

@@ -55,7 +47,7 @@ You can use the blocklist of optimization rules to disable some of them if some
5547

5648
> **Note:**
5749
>
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.
5951
6052
- If you want to disable some rules, write its name to the `mysql.opt_rule_blacklist` table. For example:
6153

0 commit comments

Comments
 (0)