explain_query
Explain a SQL query's execution plan and optionally simulate hypothetical indexes to identify performance bottlenecks and optimize queries.
Instructions
Explain a SQL query and optionally simulate hypothetical indexes
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 | SQL query to explain | |
| analyze | No | Execute the statement to collect actual statistics | |
| hypothetical_indexes | No | Hypothetical index definitions |