recommend_indexes_for_queries
Analyze SQL queries using the ESR rule to recommend composite, covering, partial, and expression indexes, detect non-sargable predicates, and flag redundant left-prefix indexes for PostgreSQL and MySQL.
Instructions
Analyze raw SQL queries (including JOINs, CTEs, subqueries) using the ESR (Equality, Sort, Range) rule to recommend composite, covering, partial, and expression indexes, detect non-sargable predicates, and find redundant left-prefix 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": {
"dialect": "<dialect>",
"queries": "<queries>"
},
"name": "recommend_indexes_for_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dialect | Yes | ||
| queries | Yes | ||
| cardinality_hints | No | ||
| existing_schema_ddl | No | ||
| migration_files_dir | No |