Home | About | Apps | Github | Rss

Postgres Show Table Size on Disk

The following commands allow you to query the size on disk occupied by tables, dbs and other relations. 

Table size 

SELECT pg_size_pretty( pg_total_relation_size('table_name') );

db size

SELECT pg_size_pretty( pg_database_size('dbname') );

More posts