PgHero
No long running queries
Connections healthy 4
Vacuuming healthy
No columns near integer overflow
No invalid indexes or constraints
No duplicate indexes
1 suggested index
2 slow queries

Suggested Indexes

Add indexes to speed up queries.


Details
CREATE INDEX CONCURRENTLY ON pghero_space_stats (relation, captured_at)

to speed up

Total Time Average Time Calls
0 min 2% 36 ms 173 pghero · details
SELECT captured_at, size AS size_bytes FROM pghero_space_stats WHERE database = ? AND captured_at >= ? AND schema = ? AND relation = ? ORDER BY 1 ASC /*pghero*/

Slow Queries

Slow queries take 20 ms or more on average and have been called at least 100 times.

Explain queries to see where to add indexes.

Total Time Average Time Calls
0 min 3% 75 ms 180 pghero · details
SELECT n.nspname AS schema, c.relname AS relation, CASE c.relkind WHEN ? THEN ? WHEN ? then ? ELSE ? END AS type, pg_table_size(c.oid) AS size_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname NOT IN (?, ?) AND n.nspname !~ ? AND c.relkind IN (?, ?, ?) ORDER BY pg_table_size(c.oid) DESC, 2 ASC /*pghero*/
0 min 2% 36 ms 173 pghero · details
SELECT captured_at, size AS size_bytes FROM pghero_space_stats WHERE database = ? AND captured_at >= ? AND schema = ? AND relation = ? ORDER BY 1 ASC /*pghero*/
Details
CREATE INDEX CONCURRENTLY ON pghero_space_stats (relation, captured_at)