explain_plan
Return the engine-native query plan for a query (SQLite: EXPLAIN QUERY PLAN) plus full-table-scan warnings. Use it to check whether an index would be used before recommending one. Example: "SELECT * FROM orders WHERE status=?" on an unindexed column → plan ["SCAN orders"], warning about the full scan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ONE SQL statement to explain. | |
| engine | No | Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only. | |
| schema | Yes | DDL statements (include your indexes!). |