Created
April 21, 2020 18:12
-
-
Save todgru/1a26fd2c2b5b173ba5eeb8bf02014a7b to your computer and use it in GitHub Desktop.
display size of postgres database and table
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 ( | |
pg_total_relation_size ('"camelCaseTableName"') | |
); | |
SELECT pg_size_pretty ( | |
pg_database_size ('lowercaseddbname') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment