Here are few queries where we can find the size of relations ,indexes,database----
select pg_size_pretty(pg_database_size('test1'));test1-name of the database
select pg_size_pretty(pg_total_relation_size(123455));123455-oid of the table
the above statement gives you the table size with the indexes.
If you want to find the table size alone execute the below command
select pg_size_pretty(pg_relation_size(123455));123455-oid of the table/index
No comments:
Post a Comment