tpaw Docs

Table Stats

Analyze PostgreSQL table sizes, row counts, dead tuple ratios, index scan efficiency, and vacuum history in tpaw.

The Table Stats panel gives you an overview of all tables in your database with metrics sourced from pg_stat_user_tables and pg_relation_size. Use it to identify bloated tables, tables needing vacuuming, or tables with missing indexes.

Metrics per table

MetricSourceWhat it tells you
Table sizepg_total_relation_sizeTotal disk usage including indexes and TOAST
Live rowspg_stat_user_tables.n_live_tupEstimated live row count
Dead rowspg_stat_user_tables.n_dead_tupRows deleted/updated but not yet vacuumed
Dead %dead / (live + dead)Table bloat indicator — high % means vacuum is overdue
Seq scansn_seq_scanNumber of full table scans — high count may indicate missing index
Index scansn_idx_scanNumber of index-based scans
Index scan ratioidx / (seq + idx)Low ratio = queries rarely use indexes
Last vacuumlast_vacuum or last_autovacuumWhen dead tuples were last cleaned up
Last analyzelast_analyze or last_autoanalyzeWhen statistics were last updated

Automated insights

tpaw surfaces table-level warnings automatically:

High dead tuple ratio (>20%)

This table has significant bloat. Run VACUUM ANALYZE table_name; to reclaim space and update statistics.

Many sequential scans with low index ratio

Queries are doing full table scans. Check if an index on frequently-filtered columns would help.

Vacuum overdue (>7 days)

Autovacuum may not be running, or the table is too busy for autovacuum to keep up. Run VACUUM manually during a low-traffic period.

Large table without recent analyze

Query planner statistics are stale. Run ANALYZE table_name; to update them.

Sorting the table

Click any column header to sort by that metric. Click again to reverse. Useful patterns:

  • Sort by Dead % descending to find tables most in need of vacuuming
  • Sort by Table size descending to find the largest tables
  • Sort by Seq scans descending to find tables with possible missing indexes

Searching

Use the search bar to filter by table name. Useful when you have many tables and want to jump to a specific one.

Running VACUUM manually

To vacuum a specific table, open the Query Editor and run:

-- Reclaim dead tuple space
VACUUM ANALYZE public.orders;
 
-- Full vacuum (rewrites table, requires exclusive lock)
VACUUM FULL ANALYZE public.orders;

VACUUM ANALYZE is safe to run in production. VACUUM FULL acquires an exclusive lock and is disruptive — use it only during maintenance windows.

On this page