explain_query
Obtain a PostgreSQL execution plan for any SQL statement to pinpoint performance issues. Use ANALYZE for real execution timing, while noting that writes like INSERT/UPDATE/DELETE will actually run.
Instructions
Get query execution plan.
Args:
sql: SQL statement to explain.
analyze: If true, actually executes the query for real timing data
(default: value of EXPLAIN_ANALYZE in .env, normally false).
WARNING: true really runs the query, including any
INSERT/UPDATE/DELETE it contains — use with care.
database_url: Database URL (optional, uses DATABASE_URL from .env if omitted).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| analyze | No | ||
| database_url | No |