Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: explain analyze graphical #1261

Merged
merged 7 commits into from
Oct 14, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: EXPLAIN ANALYZE GRAPHICAL
---

`EXPLAIN ANALYZE GRAPHICAL` used to open a browser page to display a query execution plan along with actual run-time performance statistics.

This is useful for analyzing query performance and identifying bottlenecks in a query.

**Note:** This feature is available only in `bensql`.
Maricaya marked this conversation as resolved.
Show resolved Hide resolved

## Syntax

```sql
EXPLAIN ANALYZE GRAPHICAL <statement>
```

## Examples

TPC-H Q21:
```sql
EXPLAIN ANALYZE GRAPHICAL SELECT s_name,
-> Count(*) AS numwait
-> FROM supplier,
-> lineitem l1,
-> orders,
-> nation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Maricaya I wonder if these arrows can be removed ?

-> WHERE s_suppkey = l1.l_suppkey
-> AND o_orderkey = l1.l_orderkey
-> AND o_orderstatus = 'F'
-> AND l1.l_receiptdate > l1.l_commitdate
-> AND EXISTS (SELECT *
-> FROM lineitem l2
-> WHERE l2.l_orderkey = l1.l_orderkey
-> AND l2.l_suppkey <> l1.l_suppkey)
-> AND NOT EXISTS (SELECT *
-> FROM lineitem l3
-> WHERE l3.l_orderkey = l1.l_orderkey
-> AND l3.l_suppkey <> l1.l_suppkey
-> AND l3.l_receiptdate > l3.l_commitdate)
-> AND s_nationkey = n_nationkey
-> AND n_name = 'EGYPT'
-> GROUP BY s_name
-> ORDER BY numwait DESC,
-> s_name
-> LIMIT 100;

// will open a browser page to display the query execution plan and performance statistics.
```