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

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 44% 48 ms 131 demos · details
WITH query_stats AS ( SELECT query_hash AS query_hash, pghero_query_stats.user AS user, array_agg(LEFT(query, $1) ORDER BY REPLACE(LEFT(query, $2), $3, $4) COLLATE "C" ASC) AS query, (SUM(total_time) / $5 / $6) AS total_minutes, (SUM(total_time) / SUM(calls)) AS average_time, SUM(calls) AS calls FROM pghero_query_stats WHERE database = $7 AND query_hash IS NOT NULL AND captured_at >= $8 GROUP BY 1, 2 ) SELECT query_hash, query_stats.user, query[$9] AS query, query[array_length(query, $10)] AS explainable_query, total_minutes, average_time, calls, total_minutes * $11 / (SELECT SUM(total_minutes) FROM query_stats) AS total_percent, (SELECT SUM(total_minutes) FROM query_stats) AS all_queries_total_minutes FROM query_stats ORDER BY "total_minutes" DESC LIMIT $12 /*pghero*/