explain_postgres
Analyze a SELECT query's performance by executing it with EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) and returning the execution plan with real timings and buffer usage.
Instructions
Run EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) on a query and return the plan.
The query executes to collect real timing; results are discarded — only the plan is returned. A statement timeout prevents runaway queries.
Returns: {"plan": []}
Use before running a slow or unfamiliar query on a large table. Check describe_postgres_schema first to see what indexes exist. Write queries are blocked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |