DEV Community

dimas
dimas

Posted on

Check Table size in Postgresql Database

Check Table size in Postgresql Database

select
  table_name,
  pg_size_pretty(pg_total_relation_size(quote_ident(table_name))),
  pg_total_relation_size(quote_ident(table_name))
from information_schema.tables
where table_schema = 'public'
order by 3 desc;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)