Explain query plan
explain_queryShow the execution plan for any SQL statement—index usage, scan order, estimated rows—without executing it, making write statements safe to analyze.
Instructions
Show the execution plan for a statement (EXPLAIN / EXPLAIN QUERY PLAN) without running it — index usage, scan order, estimated rows. Safe on write statements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Statement to plan (does not get executed) | |
| params | No | Bound parameters: array for positional placeholders (?), object for named ones (:name) where the driver supports them. | |
| connection | No | Named connection to use. Omit when only one connection is configured (or it is named "default"). |