Understanding the tidb_enable_outer_join_reorder Parameter

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于tidb_enable_outer_join_reorder参数理解

| username: wenyi

The tidb_enable_outer_join_reorder parameter controls outer join reordering and is enabled by default. If this parameter is disabled, how will left join and right join in SQL statements be executed? Does disabling the tidb_enable_outer_join_reorder parameter mean that TiDB does not support outer joins?

| username: wenyi | Original post link

I disabled the parameter and tested it. The outer join can also execute normally, and the SQL performance is similar to when the tidb_enable_outer_join_reorder parameter is enabled.

| username: 小龙虾爱大龙虾 | Original post link

This parameter affects the join order selection when multiple tables are associated with an outer join. Enabling this allows the optimizer to have more execution plans to choose from, potentially finding a more optimal execution plan. It is enabled by default in higher versions.

| username: 数据库真NB | Original post link

The test case you used might not have triggered this parameter.

| username: 数据库真NB | Original post link

It should be choosing the path of a possible associated data file, or opening it. It’s not easy to test whether it works.

| username: zhaokede | Original post link

Still keep it enabled by default.