Database Index Advisor
Get smart index recommendations for faster databases
gpt-4o-mini
Your prompt will appear here…
Your beautifully formatted article will appear here once you generate.
No history yet
Your generations will appear here. Sign in to save them permanently.
Why does one report page take eleven seconds while every other screen loads instantly? Have you ever added an index, seen no change, and quietly added another? The Database Index Advisor reads the slow query and the table shapes you paste in, then tells you which columns are worth indexing, in what order, and which existing indexes earn nothing.
Database Index Advisor takes a slow query, its table definition and a rough row count, and returns an index plan: the columns worth indexing, the order they belong in, and the write cost you accept in exchange.
What is Database Index Advisor?
Indexing looks simple until you have three candidate columns and no idea which order they belong in. Database Index Advisor is a reading tool. You give it the query, the columns and a rough table size, and it writes back a plan with the CREATE INDEX statements underneath. It never connects to your server, so treat the answer as advice from a careful reviewer, not as a measurement.
What To Paste Before You Ask For An Index Plan
Paste four things: the query, the table definition, roughly how many rows it holds, and the indexes already on it. Row counts matter most, because an index that saves you at ten million rows is pointless at five thousand.
SELECT id, total FROM orders
WHERE status = 'pending' AND placed_at BETWEEN ? AND ?
ORDER BY placed_at DESC LIMIT 50;
Add a line saying the orders table holds four million rows and already has an index on status alone. That detail changes the recommendation. If you are still writing the query, the SQL Generator turns plain English into SQL to bring back here.
How Does Database Index Advisor Work?
Three settings decide the shape of the answer. Set Output Type to Index Plan, or the panel offers you a schema instead. Set Complexity to Optimized so write cost is weighed against read speed. Set Database to the engine you actually run, because PostgreSQL and MySQL do not handle composite indexes alike. What comes back is a ranked list of candidate indexes, each with the reason it earns its place.
Careful Adding an index is cheap to undo. Dropping one is not, because you cannot see which report quietly depended on it.
Slow Screens That Trace Back To A Missing Index
Index questions usually arrive as a complaint about a screen, not as a query.
| Slow screen | What the plan often lands on |
|---|---|
| Orders list filtered by status, sorted by date | One composite index, equality column first |
| Dashboard joining three tables | An index on each foreign key, not on every column |
Prove The Plan With Your Own EXPLAIN Output
The plan is a hypothesis. Your database is the only place it can be settled.
- Run EXPLAIN on the query as it stands and keep the output.
- Apply the index to a copy of the database, never production first.
- Run EXPLAIN again and compare rows examined and the index chosen.
- Watch write heavy tables for a day, because every index slows inserts.
What The Advisor Cannot See
It cannot see your data. It does not know that most of your orders sit in one status value, and that single fact decides whether indexing that column helps at all.
What it does well
- Explains column order, not just which columns to index
- Spots indexes that duplicate each other
- Hands you CREATE INDEX text ready for a migration
What to watch for
- Cannot see your data spread, so a suggestion can miss
- Measures nothing, so every plan needs your own EXPLAIN run
- Long schemas must be trimmed to the query's own tables
Nothing on EizTools costs anything, and no tool asks you to sign in first. You pick the AI model yourself before each run, which matters here, because a second opinion from a different engine is worth having on a query that refuses to speed up. Database Index Advisor sits alongside the other coding tools, one click from the rest of your database work.
Frequently Asked Questions
What does Complexity set to Optimized change?
It pushes the plan to weigh write cost against read speed, so you get a short list with a reason attached to each entry rather than one index for every column in your WHERE clause.
Do I have to give it my real schema?
No. Rename the tables and columns if you prefer. Keep the data types, the relationships and the row counts accurate, because those are the details an index plan actually depends on.
Can it tell me which indexes to remove?
It can flag ones that look redundant, such as a single column index already covered by a composite. Confirm every candidate against your own usage statistics before you drop anything.
Will the suggested index definitely make my query faster?
Not guaranteed. The plan is reasoned from what you pasted, not measured on your data. Apply it to a copy, run EXPLAIN, and keep the index only when the numbers move.
A good index plan is half reasoning and half evidence. The reasoning stalls people, and it takes a couple of minutes here. The evidence is yours, from your own EXPLAIN output. Paste your slowest query into Database Index Advisor above and see what it makes of the columns you already indexed.