PgHero
No long running queries
Connections healthy 38
Vacuuming healthy
No columns near integer overflow
No invalid indexes
No duplicate indexes
1 suggested index
1 slow query

Suggested Indexes

Add indexes to speed up queries. Here’s a migration to help.


Details
CREATE INDEX CONCURRENTLY ON tweets (query_id, retweet_count)

to speed up

Total Time Average Time Calls
0 min 60% 37 ms 258 project_n · details
SELECT SUM("tweets"."retweet_count") AS sum_retweet_count, "tweets"."screen_name" AS tweets_screen_name FROM "tweets" WHERE "tweets"."query_id" = $1 AND "tweets"."retweet" = $2 AND (retweet_count > $3) GROUP BY "tweets"."screen_name"

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 60% 37 ms 258 project_n · details
SELECT SUM("tweets"."retweet_count") AS sum_retweet_count, "tweets"."screen_name" AS tweets_screen_name FROM "tweets" WHERE "tweets"."query_id" = $1 AND "tweets"."retweet" = $2 AND (retweet_count > $3) GROUP BY "tweets"."screen_name"
Details
CREATE INDEX CONCURRENTLY ON tweets (query_id, retweet_count)