psql -d appdb -c "SELECT * FROM pg_stat_user_tables WHERE relname = 'users';"

Category: Databases & SQL

psql -d appdb -c "SELECT * FROM pg_stat_user_tables WHERE relname = 'users';"

Show per-table scan and tuple stats

Per-table counters: sequential and index scans, tuples inserted, updated, deleted, and the last vacuum and analyze timestamps. seq_scan far above idx_scan hints at a missing index.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.