Skip to content

Find slow queries and index problems

Slow Queries compares recorded statements by execution time and calls. Indexes shows index definitions and available usage statistics so you can review the indexes behind those queries.

For work that is blocked right now, start with connections and locks.

  1. Open Admin › Slow Queries.
  2. Adjust Min duration: to the minimum average execution time you want to include, in seconds.
  3. Select a statement to inspect its SQL and statistics.
  4. Compare its average time, total time and call count.
  5. Choose EXPLAIN, when available, to open the plan dialog.
  6. Click EXPLAIN in the dialog to load the plan.

A high total time can come from many short calls or a few long ones. Compare both timing and frequency before choosing a query to investigate.

Slow Queries with a selected statement and the Query Execution Plan dialog showing EXPLAIN output

Use Explain with AI for an explanation of one plan. Use AI Database Analysis for recommendations across the database.

  1. Open Admin › Indexes.
  2. Search for the affected table or index.
  3. Compare the index columns, constraints and available size or usage figures.
  4. Enable Unused only, when available, to review candidates with no recorded scans.
  5. Compare those candidates with the query plans that matter to your application.

Check the statistics history before treating a zero count as evidence for removal. Counters reflect recorded activity since collection began or statistics were reset. Include infrequent reports and scheduled jobs in your review.

Preserve the index definition before removal so you can recreate it if necessary. Removing an index can make queries slower.

  1. Open the index row’s action menu.
  2. Choose Drop Index.
  3. Review the table, index name and SQL in the confirmation dialog.
  4. Type the index name exactly as shown.
  5. Enter the connection password if requested.
  6. Click Drop Index.

Use change structure for index additions and other schema edits.

Database Statistics and index view
PostgreSQL Statement statistics require pg_stat_statements. Index details include sizes, scans and tuples read.
MySQL Statement summaries require performance_schema; index usage depends on active statistics collection.
MariaDB Statement summaries require performance_schema; available index statistics depend on server instrumentation.
SQLite Index definitions include columns and uniqueness; index sizes use dbstat when available.
Amazon Redshift Workload statistics use Redshift sources. Indexes displays Table Design: distribution style and key, sort key, encoding, skew and statistics freshness.

Follow admin data unavailable for statistics setup and access checks.