get_execution_plan
Retrieve the execution plan for a Firebird SELECT query to reveal index usage and detect full table scans, enabling optimization before running costly queries.
Instructions
Return the execution plan for a SELECT query — shows which indexes Firebird will use. Useful for spotting full table scans before running expensive queries. database: key from list_databases. sql: a SELECT statement (not DML) — the query is prepared but not executed, so it is safe to use on large tables. Returns a plan string, e.g. 'PLAN (TABLE NATURAL)' or 'PLAN (TABLE INDEX (INDEX_NAME))'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | ||
| sql | Yes |