Preview execution plan
db_explain_planAnalyze how Oracle executes a SELECT query by generating its execution plan, identifying performance issues without running the query.
Instructions
Generate and display the execution plan for a SQL query WITHOUT executing it.
Uses Oracle's EXPLAIN PLAN to show how the query optimizer would run the query: table access methods (FULL SCAN, INDEX RANGE SCAN, etc.), join strategies, and filter predicates.
Use this to understand query performance before running expensive queries.
Args:
sql (string): Read-only SQL (SELECT/WITH only) to analyze
params (array): Bind variable values (default: [])
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": "db_explain_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A read-only SQL query (SELECT or WITH) to analyze. Must not contain DML/DDL. | |
| params | No | Parameter values for :1, :2, ... bind variables. |