Postgresql table space
SELECT
schemaname, tablename, pg_size_pretty(size) AS size_pretty,
pg_size_pretty(total_size) AS total_size_pretty
FROM
(SELECT *, pg_relation_size(schemaname||'.'||tablename) AS size,
pg_total_relation_size(schemaname||'.'||tablename) AS total_size
FROM pg_tables where schemaname = 'public') AS TABLES
ORDER BY total_size DESC;
Written by Eduard Carreras
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Postgresql
Authors
Related Tags
#postgresql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#