Created
April 6, 2015 09:58
-
-
Save AndreyStekov/ea09951a120f1400921e to your computer and use it in GitHub Desktop.
Get schema size (postgres).
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 pg_size_pretty(sum(pg_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename)))::bigint) FROM pg_tables | |
WHERE schemaname = 'yourschema' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment