Health and performance · stop 8 of 13
suggest_indexes
Suggests indexes that would likely help.
Works in read modeTool sets: dba · full
You might ask
“Which indexes are we missing?”
Your assistant may call suggest_indexes to answer.
How it works
- Looks at tables read mostly by sequential scans, foreign-key columns with no index, and slow statements.
- Pass
sqlto base the suggestions on one query's plan. Nothing is created.
Parameters
limitnumber- Maximum number of suggestions to return. Default 10.
sqlstring- Optional SELECT/WITH statement whose plan should inform the suggestions.
What your assistant reads
The description nexql-mcp sends with the tool. It's how the assistant decides when to use it.
Suggest indexes from high sequential-scan tables, unindexed FK columns, and optional pg_stat_statements / EXPLAIN plan heuristics. Pass sql to analyze a specific query plan.