From 109b3e5df8804e1f2023eb7e783cad3a60e32a13 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 16:18:05 +0800 Subject: [PATCH 1/6] Add temp.md --- temp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp.md diff --git a/temp.md b/temp.md new file mode 100644 index 0000000000000..af27ff4986a7b --- /dev/null +++ b/temp.md @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From 8ecb96a1d05efe8d38f079512190fb67bd0112cf Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 16:18:10 +0800 Subject: [PATCH 2/6] Delete temp.md --- temp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp.md diff --git a/temp.md b/temp.md deleted file mode 100644 index af27ff4986a7b..0000000000000 --- a/temp.md +++ /dev/null @@ -1 +0,0 @@ -This is a test file. \ No newline at end of file From 7552ab491d188a70d8c7db7cd8b495dde84680f0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 16:39:30 +0800 Subject: [PATCH 3/6] Update sql-statement-explain.md --- sql-statements/sql-statement-explain.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-explain.md b/sql-statements/sql-statement-explain.md index 5a872c6ffc28a..8b97048aea797 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -8,7 +8,11 @@ aliases: ['/docs/dev/sql-statements/sql-statement-explain/','/docs/dev/reference The `EXPLAIN` statement shows the execution plan for a query without executing it. It complements the `EXPLAIN ANALYZE` statement, which executes the query. If the output of `EXPLAIN` does not match the expected result, consider executing `ANALYZE TABLE` on each table in the query to make sure the table statistics are up to date. -The statements `DESC` and `DESCRIBE` are aliases of this statement. The alternative usage of `EXPLAIN ` is documented under [`SHOW [FULL] COLUMNS FROM`](/sql-statements/sql-statement-show-columns-from.md). +> **Note:** +> +> Certain subqueries are pre-executed during the optimization phase to generate more optimal execution plans, even in the `EXPLAIN` statement. For more information on this behavior and how to disable it, see [`tidb_opt_enable_non_eval_scalar_subquery`](/system-variables.md#tidb_opt_enable_non_eval_scalar_subquery-introduced-in-v730) and [Disable the early execution of subqueries](/explain-walkthrough.md#disable-the-early-execution-of-subqueries). + +The statements `DESC` and `DESCRIBE` are aliases of the `EXPLAIN` statement. The alternative usage of `EXPLAIN ` is documented under [`SHOW [FULL] COLUMNS FROM`](/sql-statements/sql-statement-show-columns-from.md). TiDB supports the `EXPLAIN [options] FOR CONNECTION connection_id` statement. However, this statement is different from the `EXPLAIN FOR` statement in MySQL. For more details, see [`EXPLAIN FOR CONNECTION`](#explain-for-connection). From f1dfb20a8ca5d46c93921091e5418252b3cfe4d9 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 16:40:59 +0800 Subject: [PATCH 4/6] fix a link --- sql-statements/sql-statement-explain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-explain.md b/sql-statements/sql-statement-explain.md index 8b97048aea797..0a91cce1035c3 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -10,7 +10,7 @@ The `EXPLAIN` statement shows the execution plan for a query without executing i > **Note:** > -> Certain subqueries are pre-executed during the optimization phase to generate more optimal execution plans, even in the `EXPLAIN` statement. For more information on this behavior and how to disable it, see [`tidb_opt_enable_non_eval_scalar_subquery`](/system-variables.md#tidb_opt_enable_non_eval_scalar_subquery-introduced-in-v730) and [Disable the early execution of subqueries](/explain-walkthrough.md#disable-the-early-execution-of-subqueries). +> Certain subqueries are pre-executed during the optimization phase to generate more optimal execution plans, even in the `EXPLAIN` statement. For more information on this behavior and how to disable it, see [`tidb_opt_enable_non_eval_scalar_subquery`](/system-variables.md#tidb_opt_enable_non_eval_scalar_subquery-new-in-v730) and [Disable the early execution of subqueries](/explain-walkthrough.md#disable-the-early-execution-of-subqueries). The statements `DESC` and `DESCRIBE` are aliases of the `EXPLAIN` statement. The alternative usage of `EXPLAIN ` is documented under [`SHOW [FULL] COLUMNS FROM`](/sql-statements/sql-statement-show-columns-from.md). From 28613424f7a527d2612c351f35340b3703849de0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 18:02:28 +0800 Subject: [PATCH 5/6] Update sql-statements/sql-statement-explain.md --- sql-statements/sql-statement-explain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-explain.md b/sql-statements/sql-statement-explain.md index 0a91cce1035c3..adefd65c03ca8 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -10,7 +10,7 @@ The `EXPLAIN` statement shows the execution plan for a query without executing i > **Note:** > -> Certain subqueries are pre-executed during the optimization phase to generate more optimal execution plans, even in the `EXPLAIN` statement. For more information on this behavior and how to disable it, see [`tidb_opt_enable_non_eval_scalar_subquery`](/system-variables.md#tidb_opt_enable_non_eval_scalar_subquery-new-in-v730) and [Disable the early execution of subqueries](/explain-walkthrough.md#disable-the-early-execution-of-subqueries). +> Certain subqueries are pre-executed during the optimization phase to generate optimal execution plans, even in the `EXPLAIN` statement. For more information on this behavior and how to disable it, see [`tidb_opt_enable_non_eval_scalar_subquery`](/system-variables.md#tidb_opt_enable_non_eval_scalar_subquery-new-in-v730) and [Disable the early execution of subqueries](/explain-walkthrough.md#disable-the-early-execution-of-subqueries). The statements `DESC` and `DESCRIBE` are aliases of the `EXPLAIN` statement. The alternative usage of `EXPLAIN ` is documented under [`SHOW [FULL] COLUMNS FROM`](/sql-statements/sql-statement-show-columns-from.md). From 131fcb3c8e65f04782abe49033087fabf204b1d8 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 19:51:53 +0800 Subject: [PATCH 6/6] Update sql-statements/sql-statement-explain.md Co-authored-by: xixirangrang --- sql-statements/sql-statement-explain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-explain.md b/sql-statements/sql-statement-explain.md index adefd65c03ca8..476a174b3b8de 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -12,7 +12,7 @@ The `EXPLAIN` statement shows the execution plan for a query without executing i > > Certain subqueries are pre-executed during the optimization phase to generate optimal execution plans, even in the `EXPLAIN` statement. For more information on this behavior and how to disable it, see [`tidb_opt_enable_non_eval_scalar_subquery`](/system-variables.md#tidb_opt_enable_non_eval_scalar_subquery-new-in-v730) and [Disable the early execution of subqueries](/explain-walkthrough.md#disable-the-early-execution-of-subqueries). -The statements `DESC` and `DESCRIBE` are aliases of the `EXPLAIN` statement. The alternative usage of `EXPLAIN ` is documented under [`SHOW [FULL] COLUMNS FROM`](/sql-statements/sql-statement-show-columns-from.md). +The statements `DESC` and `DESCRIBE` are aliases of the `EXPLAIN` statement. The alternative usage of `EXPLAIN ` is documented in [`SHOW [FULL] COLUMNS FROM`](/sql-statements/sql-statement-show-columns-from.md). TiDB supports the `EXPLAIN [options] FOR CONNECTION connection_id` statement. However, this statement is different from the `EXPLAIN FOR` statement in MySQL. For more details, see [`EXPLAIN FOR CONNECTION`](#explain-for-connection).