Getting the Size of Postgresql Tables

How to get the size of a postgresql table

In a recent post I explained how to get the size of an entire database with psql, in this post, I will show you how to get the size of a single table from your current database. Use the following from a psql prompt:

SELECT pg_size_pretty(pg_total_relation_size(‘big_table’));

Leave a Reply

Your email address will not be published. Required fields are marked *