EXPLAIN PERF
Introduced or updated: v1.2.765
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.
It is helpful to analyze query performance and help identify bottlenecks.
Syntax
EXPLAIN PERF <statement>
Examples
bendsql --quote-style never --query="EXPLAIN PERF SELECT avg(number) FROM numbers(10000000)" > demo.html
Then, you can open the demo.html
file in your browser to view the flame graphs:
If the query finishes very quickly, it may not collect enough data, resulting in an empty flame graph.