explain_query
Get the execution plan for a SQL query to analyze performance. Optionally run EXPLAIN ANALYZE to execute the query and see actual run times.
Instructions
Return an EXPLAIN plan for a query. ANALYZE executes the query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query to explain | |
| analyze | No | Run EXPLAIN ANALYZE (executes the query). Limited in read-only mode. | |
| format | No | Output format for the execution plan | text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |