Re: How to know the sizes of all tables & indexes in a database

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

 



Try:-
 
SELECT relname, relpages, CAST(reltuples AS numeric) ,
 ( (relpages*8192)/1024 ) as MB
FROM pg_class
 
...which will give you space used on disk for all data pages currently in use per table (assuming you have 8k data pages - the default).

 
On 8/9/06, Sharma;G.S. <ghanshyam@xxxxxxxxxxxx> wrote:
Hi,
Postgres 7.3
Is there any way to know the size taken up by each table and indexes in postgres .
I am having a 53 GB database which contains tables , indexes, functions etc , how i can distribute these 53 GB's in database objects .
 
Thanks in advance
Disclaimer :- This e-mail message including any attachment may contain confidential, proprietary or legally privileged information. It should not be used by who is not the original intended recipient. If you have erroneously received this message, you are notified that you are strictly prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd and / or its subsidiary Companies accept no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of Newgen Software Technologies Ltd and / or its subsidiary Companies, as applicable.


[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