From e1e6086136193b2175953bd99893cd2b5a747c7b 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 457afaec2df67..a7861b343442d 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -191,10 +191,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 9682286fe4f4c1edb2ff00a07410dc14520d7a78 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 a7861b343442d..488136c247523 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -195,7 +195,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 741778c718f07675e5537370a4a1b484208a422f 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 488136c247523..f1249a3d3df01 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 | `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 b9ed31f8223eb5c44defd91b340c3cc8d026fbd5 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 f1249a3d3df01..9e0918facfa9a 100644 --- a/sql-statements/sql-statement-explain.md +++ b/sql-statements/sql-statement-explain.md @@ -195,7 +195,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. |