Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility update for outer join reorder #10110

Merged
merged 1 commit into from Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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