You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`EXPLAIN PERF <statement>` can also be used for CPU profiling, which focuses on a specific query and gathers CPU profiling data from other nodes to help analyze query performance. Check [EXPLAIN PERF](/sql/sql-commands/explain-cmds/explain-perf) for more details.
17
+
14
18
## Memory profiling
15
19
16
20
`databend-query` and `databend-meta` can be built optionally with `jemalloc`,
import FunctionDescription from '@site/src/components/FunctionDescription';
6
+
import Tabs from '@theme/Tabs';
7
+
import TabItem from '@theme/TabItem';
8
+
9
+
<FunctionDescriptiondescription="Introduced or updated: v1.2.765"/>
10
+
11
+
`EXPLAIN PERF` captures stack traces to perform CPU profiling. This command returns an HTML file containing flame graphs generated from data collected from all nodes in the current cluster. You can directly open this HTML file in your browser.
12
+
13
+
It is helpful to analyze query performance and help identify bottlenecks.
14
+
15
+
## Syntax
16
+
17
+
```sql
18
+
EXPLAIN PERF <statement>
19
+
```
20
+
21
+
## Examples
22
+
23
+
```shell
24
+
bendsql --quote-style never --query="EXPLAIN PERF SELECT avg(number) FROM numbers(10000000)"> demo.html
25
+
```
26
+
27
+
Then, you can open the `demo.html` file in your browser to view the flame graphs:
0 commit comments