Pages

Friday, March 6, 2015

find database size postgres

find database size postgres

To find the size of database in postgres through SQL query.


SELECT pg_size_pretty(pg_database_size('Database Name'));
 
To find the size of a table in a database  through SQL query. 
  
SELECT pg_size_pretty(pg_relation_size('table_name')); 
 
Solution :

http://stackoverflow.com/questions/18907047/postgres-db-size-command

No comments:

Post a Comment