From ae7424e1f93d45e49d28ddf98353384a29c0042b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 5 Dec 2023 15:00:19 +0100 Subject: [PATCH 1/4] Add more explain formats --- sql-statements/sql-statement-explain.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sql-statements/sql-statement-explain.md b/sql-statements/sql-statement-explain.md index e74af4f93c03b..0ea238c38ac1f 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -192,10 +192,12 @@ To specify the format of the `EXPLAIN` output, you can use the `FORMAT = xxx` sy | FORMAT | Description | | ------ | ------ | | Not specified | If the format is not specified, `EXPLAIN` uses the default format `row`. | -| `row` | The `EXPLAIN` statement outputs results in a tabular format. See [Understand the Query Execution Plan](/explain-overview.md) for more information. | -| `brief` | The operator IDs in the output of the `EXPLAIN` statement are simplified, compared with those when `FORMAT` is left unspecified. | -| `dot` | The `EXPLAIN` statement outputs DOT execution plans, which can be used to generate PNG files through a `dot` program (in the `graphviz` package). | -| `tidb_json` | The `EXPLAIN` statement outputs execution plans in JSON and stores the operator information in a JSON array. | +| `brief` | The operator IDs in the output of the `EXPLAIN` statement are simplified, compared with those when `FORMAT` is left unspecified. | +| `dot` | The `EXPLAIN` statement outputs DOT execution plans, which can be used to generate PNG files through a `dot` program (in the `graphviz` package). | +| `row` | The `EXPLAIN` statement outputs results in a tabular format. See [Understand the Query Execution Plan](/explain-overview.md) for more information. | +| `tidb_json` | The `EXPLAIN` statement outputs execution plans in JSON and stores the operator information in a JSON array. | +| `verbose` | The `EXPLAIN` statement outputs in the `row` format, but an `estCost` column is added for the estimated cost of the query. See [SQL Plan Management](/sql-plan-management.md) for how this can be used. | +| `plan_cache` | The `EXPLAIN` statement outputs in the `row` format, but adds [Plan Cache](/sql-non-prepared-plan-cache.md) information as a warning. | From c5081be69381673c0338fd5c8a717a6cdd252474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 19 Dec 2023 10:05:04 +0100 Subject: [PATCH 2/4] Update sql-statements/sql-statement-explain.md Co-authored-by: Grace Cai --- 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 0ea238c38ac1f..17ef76e31b4cf 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -196,7 +196,7 @@ To specify the format of the `EXPLAIN` output, you can use the `FORMAT = xxx` sy | `dot` | The `EXPLAIN` statement outputs DOT execution plans, which can be used to generate PNG files through a `dot` program (in the `graphviz` package). | | `row` | The `EXPLAIN` statement outputs results in a tabular format. See [Understand the Query Execution Plan](/explain-overview.md) for more information. | | `tidb_json` | The `EXPLAIN` statement outputs execution plans in JSON and stores the operator information in a JSON array. | -| `verbose` | The `EXPLAIN` statement outputs in the `row` format, but an `estCost` column is added for the estimated cost of the query. See [SQL Plan Management](/sql-plan-management.md) for how this can be used. | +| `verbose` | The `EXPLAIN` statement outputs results in the `row` format, with an additional `estCost` column for the estimated cost of the query in the results. See [SQL Plan Management](/sql-plan-management.md) for how this format can be used. | | `plan_cache` | The `EXPLAIN` statement outputs in the `row` format, but adds [Plan Cache](/sql-non-prepared-plan-cache.md) information as a warning. | From f109e0dac0d2ea94d00971317d747676f66e8e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 19 Dec 2023 10:05:22 +0100 Subject: [PATCH 3/4] Update sql-statements/sql-statement-explain.md Co-authored-by: Grace Cai --- 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 17ef76e31b4cf..c43a4ee4dcb7b 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -197,7 +197,7 @@ To specify the format of the `EXPLAIN` output, you can use the `FORMAT = xxx` sy | `row` | The `EXPLAIN` statement outputs results in a tabular format. See [Understand the Query Execution Plan](/explain-overview.md) for more information. | | `tidb_json` | The `EXPLAIN` statement outputs execution plans in JSON and stores the operator information in a JSON array. | | `verbose` | The `EXPLAIN` statement outputs results in the `row` format, with an additional `estCost` column for the estimated cost of the query in the results. See [SQL Plan Management](/sql-plan-management.md) for how this format can be used. | -| `plan_cache` | The `EXPLAIN` statement outputs in the `row` format, but adds [Plan Cache](/sql-non-prepared-plan-cache.md) information as a warning. | +| `plan_cache` | The `EXPLAIN` statement outputs results in the `row` format, with the [Plan Cache](/sql-non-prepared-plan-cache.md#diagnostics) information as a warning. | From 3e4ee61e6c77714a09617bd31f2e571f6ee82b0b Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 21 Dec 2023 12:01:35 +0800 Subject: [PATCH 4/4] 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 c43a4ee4dcb7b..029736828d8a1 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -196,7 +196,7 @@ To specify the format of the `EXPLAIN` output, you can use the `FORMAT = xxx` sy | `dot` | The `EXPLAIN` statement outputs DOT execution plans, which can be used to generate PNG files through a `dot` program (in the `graphviz` package). | | `row` | The `EXPLAIN` statement outputs results in a tabular format. See [Understand the Query Execution Plan](/explain-overview.md) for more information. | | `tidb_json` | The `EXPLAIN` statement outputs execution plans in JSON and stores the operator information in a JSON array. | -| `verbose` | The `EXPLAIN` statement outputs results in the `row` format, with an additional `estCost` column for the estimated cost of the query in the results. See [SQL Plan Management](/sql-plan-management.md) for how this format can be used. | +| `verbose` | The `EXPLAIN` statement outputs results in the `row` format, with an additional `estCost` column for the estimated cost of the query in the results. For more information about how to use this format, see [SQL Plan Management](/sql-plan-management.md). | | `plan_cache` | The `EXPLAIN` statement outputs results in the `row` format, with the [Plan Cache](/sql-non-prepared-plan-cache.md#diagnostics) information as a warning. |