Skip to content

Commit

Permalink
Compatibility update for outer join reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn committed Aug 23, 2022
1 parent b932294 commit c1d059c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion join-reorder.md
Expand Up @@ -47,8 +47,9 @@ The above process is the Join Reorder algorithm currently used in TiDB.

## Limitations of Join Reorder algorithm

The current Join Reorder algorithm has the following limitation:
The current Join Reorder algorithm has the following limitations:

- Limited by the calculation methods of the result sets, the algorithm cannot ensure it selects the optimum join order.
- Currently, the Join Reorder algorithm's support for Outer Join is disabled by default. To enable it, set the value of the system variable [`tidb_enable_outer_join_reorder`](/system-variables.md#tidb_enable_outer_join_reorder-new-in-v610) to `ON`.

Currently, the `STRAIGHT_JOIN` syntax is supported in TiDB to force a join order. For more information, refer to [Description of the syntax elements](/sql-statements/sql-statement-select.md#description-of-the-syntax-elements).
6 changes: 3 additions & 3 deletions system-variables.md
Expand Up @@ -1192,9 +1192,9 @@ Constraint checking is always performed in place for pessimistic transactions (d

- Scope: SESSION | GLOBAL
- Persists to cluster: Yes
- Default value: `ON`
- Since v6.1.0, the [Join Reorder](/join-reorder.md) algorithm of TiDB supports Outer Join. This variable controls the support behavior, and the default value is `ON`.
- For a cluster upgraded from a version earlier than v6.1.0, the default value is still `TRUE`.
- Default value: In v6.1.0, the default value is `ON`. After v6.1.0, the default value is `OFF`.
- Since v6.1.0, the [Join Reorder](/join-reorder.md) algorithm of TiDB supports Outer Join. This variable controls the support behavior. The default value is `OFF`, which means the Join Reorder's support for Outer Join is disabled by default.
- For a cluster upgraded from a version earlier than v6.1.0, the default value is `OFF`. For a cluster upgraded from v6.1.0, the default value is `ON`.

### tidb_enable_ordered_result_mode

Expand Down

0 comments on commit c1d059c

Please sign in to comment.