Created
August 1, 2012 12:45
-
-
Save ecarreras/3226535 to your computer and use it in GitHub Desktop.
Tamany de taules de la base de dades
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment