select actual data size for a relation?

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

 



Hi all;

Anyone know how to select / calculate the actual data size for a table or 
index?  

NOT the disk usage as in:
 pg_class.relpages -- shows disk usage including bloat
pg_relation_size() -- same as pg_class.relpages but in bytes
or pg_total_relation_size()  -- total disk usage inclusive of bloat and 
indexes

I want only the data size. I tried grabbing the sum of all the avg_width cols 
from pg_stats and multiplying times the pg_class.reltuples but this seems way 
too big.

Thoughts?



Thanks in advance

-- 
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