Useful Postgres Extension: Pg_stat_statements
citusdata.com
citusdata.com
time_per is most common, but rows_per can tell you when people have crappy filters in their code (ie, no where clause) and total calls can let you focus on the ones with the biggest improvement.
Basically a quick/dirty top 20 list of your slowest, or biggest, or hardest on the cpu queries.
SELECT query
, calls
, total_time
, total_time / calls as time_per
, stddev_time
, rows
, rows / calls as rows_per
,100.0 * shared_blks_hit / nullif(shared_blks_hit + shared_blks_read, 0) AS hit_percent
FROM pg_stat_statements
WHERE query not similar to '%pg_%'
and calls > 500
--ORDER BY calls
--ORDER BY total_time
order by time_per
--ORDER BY rows_per
DESC LIMIT 20;What I was really looking for was a ballpark estimate or guideline of what additional resources a server would need to run this extension.