explain_query
Return the JSON execution plan for a SQL statement. Optionally run the statement to collect real row counts and timing for performance tuning.
Instructions
[READ] Return the JSON execution plan for sql (EXPLAIN).
analyze=False (default) plans without executing; analyze=True runs the
statement to collect real timing — only use it for read-only SQL.
Args:
sql: A single SQL statement to EXPLAIN.
analyze: If True, execute the statement to gather real row counts/timing.
target: Target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| target | No | ||
| analyze | No |