Re: db size and tables size difference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Isabella Ghiurea <isabella.ghiurea@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux