File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
docs/cn/sql-reference/10-sql-commands/40-explain-cmds Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1
- Translation initialization: 2025-06-27T06:30:03.404187
1
+ Translation initialization: 2025-06-27T07:21:00.624160
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : EXPLAIN PERF
3
+ ---
4
+
5
+ import FunctionDescription from '@site/src /components/FunctionDescription';
6
+ import Tabs from '@theme/Tabs ';
7
+ import TabItem from '@theme/TabItem ';
8
+
9
+ <FunctionDescription description =" 引入或更新于:v1.2.765 " />
10
+
11
+ ` EXPLAIN PERF ` 通过捕获堆栈跟踪(Stack Trace)进行 CPU 性能分析。此命令返回包含火焰图(Flame Graph)的 HTML 文件,该文件基于当前集群所有节点收集的数据生成。您可直接在浏览器中打开此 HTML 文件。
12
+
13
+ 这有助于分析查询性能并识别瓶颈。
14
+
15
+ ## 语法
16
+
17
+ ``` sql
18
+ EXPLAIN PERF < statement>
19
+ ```
20
+
21
+ ## 示例
22
+
23
+ ``` shell
24
+ bendsql --quote-style never --query=" EXPLAIN PERF SELECT avg(number) FROM numbers(10000000)" > demo.html
25
+ ```
26
+
27
+ 随后在浏览器中打开 ` demo.html ` 文件查看火焰图(Flame Graph):
28
+
29
+ <img src =" https://github.com/user-attachments/assets/07acfefa-a1c3-4c00-8c43-8ca1aafc3224 " />
30
+
31
+ 若查询(Query)执行过快,可能因数据采集不足导致火焰图(Flame Graph)为空。
You can’t perform that action at this time.
0 commit comments