Explain a query
explain_queryShows the PostgreSQL execution plan for a SELECT query with node types, scans, and index suggestions; optionally executes it for real timings when enabled.
Instructions
Shows the PostgreSQL execution plan of a SELECT with a summary (node types, sequential scans, index suggestions). analyze=true executes the query and is only available if the server enables it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| params | No | ||
| analyze | No | Execute the query to get actual timings (if enabled) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | ||
| summary | Yes |