This is an automated email from the ASF dual-hosted git repository. morrysnow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new d76293d9bf [improve](doc) add doc about explain plan (#21561) d76293d9bf is described below commit d76293d9bffc45dc4ddf29189e925209b871148d Author: 谢健 <jianx...@gmail.com> AuthorDate: Fri Jul 7 12:34:52 2023 +0800 [improve](doc) add doc about explain plan (#21561) --- docs/en/docs/advanced/best-practice/query-analysis.md | 11 ++++++++--- .../docs/advanced/best-practice/query-analysis.md | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/docs/en/docs/advanced/best-practice/query-analysis.md b/docs/en/docs/advanced/best-practice/query-analysis.md index 71a9afd69f..f220cce6c9 100644 --- a/docs/en/docs/advanced/best-practice/query-analysis.md +++ b/docs/en/docs/advanced/best-practice/query-analysis.md @@ -97,9 +97,14 @@ And a Fragment will be further divided into multiple Instances. Instance is the You can view the execution plan of a SQL through the following three commands. -- `EXPLAIN GRAPH select ...;` OR `DESC GRAPH select ...;` -- `EXPLAIN select ...;` -- `EXPLAIN VERBOSE select ...;` +- `EXPLAIN GRAPH select ...;` OR `DESC GRAPH select ...;` These commands provide a graphical representation of the execution plan. +- `EXPLAIN select ...;` This command displays a textual representation of the execution plan for the specified SQL query. +- `EXPLAIN VERBOSE select ...;` Similar to the previous command, this command provides a more detailed output. +- `EXPLAIN PARSED PLAN select ...;` This command returns the parsed execution plan of the SQL query. It displays the plan trees and information about the logical operators involved in query processing. +- `EXPLAIN ANALYZED PLAN select ...;` This command returns the analyzed execution plan for the SQL query. +- `EXPLAIN REWRITTEN PLAN select ...;` This command shows the rewritten execution plan after applying any query transformations or optimizations performed by the database engine. +- `EXPLAIN OPTIMIZED PLAN select ...;` This command shows the best execution plan after CBO. +- `EXPLAIN SHAPE PLAN select ...;` This command presents the simplified execution plan with a focus on how the query is shaped and structured. The first command displays a query plan graphically. This command can more intuitively display the tree structure of the query plan and the division of Fragments: diff --git a/docs/zh-CN/docs/advanced/best-practice/query-analysis.md b/docs/zh-CN/docs/advanced/best-practice/query-analysis.md index 69299bea50..7c180b9e8c 100644 --- a/docs/zh-CN/docs/advanced/best-practice/query-analysis.md +++ b/docs/zh-CN/docs/advanced/best-practice/query-analysis.md @@ -96,9 +96,21 @@ Doris 的查询规划过程是先将一个 SQL 语句转换成一个单机执行 可以通过以下三种命令查看一个 SQL 的执行计划。 -- `EXPLAIN GRAPH select ...;` 或者 `DESC GRAPH select ...;` -- `EXPLAIN select ...;` -- `EXPLAIN VERBOSE select ...;` +- `EXPLAIN GRAPH select ...;` 或者 `DESC GRAPH select ...;`:这些命令提供了执行计划的图形表示。它们帮助我们可视化查询执行的流程,包括关联路径和数据访问方法。 + +- `EXPLAIN select ...;`:这个命令显示指定 SQL 查询的执行计划的文本表示形式。它提供了有关查询优化步骤的信息,例如操作的顺序、执行算法和访问方法等。 + +- `EXPLAIN VERBOSE select ...;`:与前一个命令类似,这个命令提供了更详细的输出结果。 + +- `EXPLAIN PARSED PLAN select ...;`:这个命令返回 SQL 查询的解析后的执行计划。它显示了计划树和查询处理中涉及的逻辑操作符的信息。 + +- `EXPLAIN ANALYZED PLAN select ...;`:这个命令返回 SQL 查询的分析后的执行计划。 + +- `EXPLAIN REWRITTEN PLAN select ...;`:这个命令在数据库引擎对查询进行任何查询转换或优化后显示了重写后的执行计划。它提供了查询为了提高性能而进行的修改的见解。 + +- `EXPLAIN OPTIMIZED PLAN select ...;` 这个命令返回了 CBO 中得到的最优计划 + +- `EXPLAIN SHAPE PLAN select ...;`:这个命令以查询的形状和结构为重点,呈现了简化后的最优执行计划。 其中第一个命令以图形化的方式展示一个查询计划,这个命令可以比较直观的展示查询计划的树形结构,以及 Fragment 的划分情况: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org