KassieZ commented on code in PR #1614:
URL: https://github.com/apache/doris-website/pull/1614#discussion_r1897390050


##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/data-query/EXPLAIN.md:
##########
@@ -0,0 +1,420 @@
+---
+{
+    "title": "EXPLAIN",
+    "language": "zh-CN"
+}
+
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## 描述
+
+EXPLAIN 语句用于展示 Doris 对于给定的查询所规划的查询计划。Doris 
查询优化器的核心目标在于,针对任意给定的查询,生成一个高效且优化的执行计划。该优化器充分利用统计信息、数据特性以及 Doris 本身的功能优势,例如 HASH 
JOIN、分区和分桶等,来精心制定执行计划。然而,由于路径搜索的固有理论限制以及优化器实现过程中的实际情况,有时生成的执行计划可能无法达到预期的执行效果。为了进一步提升执行性能,我们的首要任务是深入分析优化器当前生成的执行计划。本文将介绍如何使用
 EXPLAIN 语句,以便为后续的优化工作奠定坚实基础。
+
+## 语法
+
+```sql
+{EXPLAIN | DESC} [VERBOSE] <query_block>
+```
+
+## 必选参数
+
+**<query_block>**
+
+> 需要查看执行计划的查询语句。
+
+## 可选参数
+
+**[VERBOSE]**
+
+> 是否展示明细信息。当指定 VERBOSE 时,展示明细信息。否则,展示简略信息。详细信息包括每个算子上的详细信息,算子使用的 tuple 
序号,以及对每个 tuple 的详细说明。
+
+## 返回结果
+
+### 基本概念
+
+为了能够更好的理解 EXPLAIN 所展示的信息,这里先介绍几个 DORIS 执行计划的核心概念。
+
+| 名称      | 解释                                                         |
+| :-------- | :----------------------------------------------------------- |
+| PLAN      | 执行计划,一个查询会被执行规划器翻译成一个执行计划,之后执行计划会提供给执行引擎执行。 |
+| FRAGMENT  | 执行片段。由于 DORIS 是一个分布式执行引擎。一个完整的执行计划会被切分为多个单机的执行片段。一个 FRAGMENT 
表是一个完整的单机执行片段。多个 FRAGMENT 组合在一起,构成一个完整的 PLAN。 |
+| PLAN NODE | 算子。执行计划的最小单位。一个 FRAGMENT 由多个算子构成。每一个算子负责一个实际的执行逻辑,比如聚合,连接等。 |
+
+### 返回结果结构
+
+Doris EXPLAIN 语句的结果是一个完整的 PLAN。PLAN 内部是按照执行顺序从后到前有序排列的 FRAGMENT。FRAGMENT 
内部是按照执行顺序从后到前有序排列的算子(PLAN NODE)。
+
+示例如下:
+
+```sql

Review Comment:
   OK



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to