-- requires  pg_stat_statements
select u.usename, ss.query, ss.calls, ss.mean_time, ss.min_time,
ss.max_time, ss.rows, ss.shared_blks_hit, ss.shared_blks_read
from pg_stat_statements ss
join pg_user u on ss.userid=u.usesysid
where usename != 'rdsadmin'
order by mean_time desc;