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

Add missing explain formats #16113

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sql-statements/sql-statement-explain.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,12 @@ EXPLAIN DELETE FROM t1 WHERE c1=3;
| FORMAT | 作用 |
|-------------|-------------------------------------------------------------------|
| 未指定 | 未指定 `FORMAT` 时,默认输出格式为 `row` |
| `row` | `EXPLAIN` 语句将以表格格式输出结果。更多信息,可参阅 [TiDB 执行计划概览](/explain-overview.md) |
| `brief` | `EXPLAIN` 语句输出结果中的算子 ID 将被简化,较之未指定 `FORMAT` 时输出结果的算子 ID 更为简化 |
| `dot` | `EXPLAIN` 语句将输出 DOT 格式的执行计划,可以通过 `dot` 程序(在 `graphviz` 包中)生成 PNG 文件 |
| `row` | `EXPLAIN` 语句将以表格格式输出结果。更多信息,可参阅 [TiDB 执行计划概览](/explain-overview.md) |
| `tidb_json` | `EXPLAIN` 语句将输出 JSON 格式的执行计划,算子信息存放在一个 JSON 数组中 |
| `verbose` | `EXPLAIN` 语句将以 `row` 格式输出结果,并在结果中额外包含一个 `estCost` 列,表示查询的代价估算。有于如何使用这种格式的更多信息,可参阅[执行计划管理 (SPM)](/sql-plan-management.md)。|
qiancai marked this conversation as resolved.
Show resolved Hide resolved
| `plan_cache` | `EXPLAIN` 语句将以 `row` 格式输出结果,[执行计划缓存](/sql-non-prepared-plan-cache.md#诊断) 信息将作为 warning 显示。
qiancai marked this conversation as resolved.
Show resolved Hide resolved

<SimpleTab>

Expand Down
Loading