Is there a way I can get a list of the top 10 longest running queriesfor the day/week/month or the top 10 queries that took the most CPU?
select * from pg_stat_activity only shows the current status.