Skip to content

Instantly share code, notes, and snippets.

@arsham
Last active June 5, 2016 09:52
Show Gist options
  • Select an option

  • Save arsham/3880a50da84f3b20946a to your computer and use it in GitHub Desktop.

Select an option

Save arsham/3880a50da84f3b20946a to your computer and use it in GitHub Desktop.
Read enhanced activity stats for a particular table
select relname as "table",
seq_scan as "table scans",
seq_tup_read as "tuples scanned",
idx_scan as "index lookups",
idx_tup_fetch as "tuples fetched via index"
from pg_stat_user_tables
where relname = 'TABLE_NAME';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment