Explain query
explain_queryShow a SELECT query's execution plan without running it, then use analyze for measured timings to identify performance bottlenecks before executing on large tables.
Instructions
Show the query plan for a SELECT without running it. Pass analyze: true to execute it and get measured timings instead of estimates. Use this to tune a query before running it against a large table.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single SELECT or WITH statement. | |
| analyze | No | Run the query to collect real timings. Off by default. |