Skip to content

Instantly share code, notes, and snippets.

@todgru
Created April 21, 2020 18:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todgru/1a26fd2c2b5b173ba5eeb8bf02014a7b to your computer and use it in GitHub Desktop.
Save todgru/1a26fd2c2b5b173ba5eeb8bf02014a7b to your computer and use it in GitHub Desktop.
display size of postgres database and table
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