Skip to content

Indexes

The Indexes page shows every index in your database alongside the queries that use each one. It’s the complement to the Live Queries view — where Live Queries shows “this query could benefit from an index”, the Indexes page shows “this index is used by these queries” (or by none at all).

The main view is a table of all indexes in your database. Each row shows:

ColumnDescription
DefinitionThe indexed columns and their sort order. Primary key indexes are marked with a key icon.
NameThe index name
Used by QueriesNumber of captured queries that reference this index in their execution plan
ActionsToggle to enable or disable the index for analysis

Click a row to expand it and see the specific queries that use the index, with links to each query’s detail page.

The sidebar provides filters to narrow the list:

  • Filter by table — show only indexes on a specific table (grouped by schema if your database has multiple schemas)
  • Show all — all indexes
  • Only indexes in use — indexes referenced by at least one captured query
  • Only unused indexes — indexes not referenced by any captured query

Filter preferences persist in your browser across sessions.

Click Create Index to open a form where you select a table and one or more columns with their sort order (ASC/DESC). A live preview shows the CREATE INDEX statement that will be applied. After creation, all queries are re-analyzed to reflect the new index.

You can also create indexes directly from a query’s detail page when Query Doctor recommends one — the suggested CREATE INDEX statement can be applied with one click.

The toggle button on each index row lets you disable an index for analysis without actually dropping it. When an index is disabled, Query Doctor re-analyzes all queries as if the index didn’t exist. This is useful for:

  • Testing whether a specific index is actually helping
  • Simulating the impact of dropping an index before committing to it
  • Isolating which index is responsible for a particular plan choice

Disabled indexes appear with strikethrough styling. Primary key indexes cannot be disabled.

The summary report at Summary Report > Index Suggestions aggregates all index recommendations across your entire query workload into a single view. For each recommended index, it shows:

  • The full CREATE INDEX CONCURRENTLY statement (with a copy button)
  • Number of affected queries
  • Average cost reduction across those queries
  • Best (highest) cost reduction

Related indexes are grouped by coverage — if a recommended index on (a, b, c) covers narrower recommendations on (a, b) and (a), they’re shown together so you can see that one index satisfies multiple recommendations.

The summary report at Summary Report > Unused Indexes shows indexes that aren’t referenced by any captured query. For each unused index, it provides a DROP INDEX statement you can copy.