Isabella Ghiurea <isabella.ghiu...@nrc-cnrc.gc.ca> writes:
> SELECT nspname || '.' || relname AS 
> "relation",pg_size_pretty(pg_total_relation_size(nspname || '.' || 
> relname)) AS "s
> ize"
>   FROM pg_class C
>   LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
>   ORDER BY pg_relation_size(nspname || '.' || relname) DESC
>   LIMIT 20;

I think maybe you'd better ORDER BY pg_total_relation_size instead.
Also, maybe look further than 20 rows ... maybe the issue is many
thousands of little tables?

                        regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Reply via email to