Skip to content

Instantly share code, notes, and snippets.

@curtkim
Created March 22, 2018 01:00
Show Gist options
  • Save curtkim/882810dad99e056ba12c20709189ac2b to your computer and use it in GitHub Desktop.
Save curtkim/882810dad99e056ba12c20709189ac2b to your computer and use it in GitHub Desktop.
greenplum sql
SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables
where schemaname = '' and relname = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment