Skip to content

Instantly share code, notes, and snippets.

@gjaldon
Created May 5, 2020 05:49
Show Gist options
  • Save gjaldon/6cb1a049678e487de2ca80d61101eec1 to your computer and use it in GitHub Desktop.
Save gjaldon/6cb1a049678e487de2ca80d61101eec1 to your computer and use it in GitHub Desktop.
select schemaname,relname,seq_scan,idx_scan,seq_tup_read,idx_tup_fetch
from pg_stat_user_tables
order by coalesce(seq_scan,0)+coalesce(idx_scan,0)+coalesce(seq_tup_read,0)+coalesce(idx_tup_fetch,0) desc
limit 50;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment