Get 20 Largest Tables: select n.nspname as "schema" , relname::text as "name" , pg_size_pretty(pg_total_relation_size(c.oid))::text as "total size" , c.reltuples::numeric as "rows" from pg_class c left join pg_namespace n on n.oid = c.relnamespace where (pg_total_relation_size(c.oid)>>20)>0 and c.relkind='r' order by c.reltuples desc limit 20; |
PostgreSQL
Subpages (10):
Indexes
Logging
Partitioning
privileges
psql
Resources
Server Settings
Standby
TOAST
Vacuuming
Comments