Lars Aksel Opsahl <lars.ops...@nibio.no> writes:
>> SELECT relname, pg_size_pretty(pg_relation_size(C.oid)) FROM pg_class C LEFT 
>> JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname = 'pg_catalog' 
>> ORDER BY 2 DESC LIMIT 20; can you show the output of this query

"ORDER BY 2" is giving you a textual sort of the sizes, which is entirely
unhelpful.  Try

SELECT relname, pg_size_pretty(pg_relation_size(C.oid)) FROM pg_class C LEFT 
JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname = 'pg_catalog' 
ORDER BY pg_relation_size(C.oid) DESC LIMIT 20;

                        regards, tom lane


Reply via email to