Postgres table sizes
From the collection Ecto and Postgresql

postgresql
tables size

Postgres table sizes

You can show this QR Code to a friend or ask them to scan directly on your screen!

Thanks for sharing! 🫶

The url for this was also copied to your clipboard!
SELECT schema, table,
       pg_size_pretty(pg_relation_size(esq_tab)) AS size,
       pg_size_pretty(pg_total_relation_size(esq_tab)) AS total size
  FROM (SELECT tablename AS tabela,
               schemaname AS esquema,
               schemaname||'.'||tablename AS esq_tab
          FROM pg_catalog.pg_tables
         WHERE schemaname NOT
            IN ('pg_catalog', 'information_schema', 'pg_toast') ) AS x
 ORDER BY pg_total_relation_size(esq_tab) DESC;


https://pgpedia.info/p/pg_total_relation_size.html
See more from etori.sangiacomo