Skip to content

Instantly share code, notes, and snippets.

@dfcarpenter
Created July 10, 2019 18:11
Show Gist options
  • Save dfcarpenter/321e5fdd48d4189b54688c11aac98643 to your computer and use it in GitHub Desktop.
Save dfcarpenter/321e5fdd48d4189b54688c11aac98643 to your computer and use it in GitHub Desktop.
Postgres internal statistics about table accesses
SELECT
seq_scan,
seq_tup_read,
idx_scan,
idx_tup_fetch,
n_tup_ins,
n_tup_upd,
n_tup_del
FROM pg_catalog.pg_stat_user_tables
WHERE relname = '<table>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment