analyze_query_indexes
Recommends indexes for up to 10 SELECT queries using hypothetical-index search, returning CREATE INDEX statements, estimated sizes and costs, and before/after query costs without creating anything.
Instructions
Recommend indexes for up to 10 SELECT queries you give, each with weight 1, by the same hypothetical-index search as analyze_workload_indexes, with its 10% rule, max_index_size_mb and 30 second limit. Returns the same parts: CREATE INDEX statements with estimated sizes and costs, skipped queries with reasons, and each query's cost before and after. A query may hold values or $1-style placeholders; one with placeholders is costed with a generic plan. Statements that are not a SELECT are skipped with the reason. Nothing is created. Needs hypopg.
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": {
"queries": "<queries>"
},
"name": "analyze_query_indexes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queries | Yes | Up to 10 SELECT queries, with values or with $1-style placeholders | |
| max_index_size_mb | No | Size budget for all recommended indexes together, in MB (default 10000); a candidate that would take the total over it is not added |