Determining table size
Hello
Is there a way to find out how much disk space is taking a certain table? Or
a whole database?
TIA,
cl.
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
On Wed, 25 Jun 2003 03:28:29 -0300
"Claudio Lapidus" <clapidus@hotmail.com> wrote:
Is there a way to find out how much disk space is taking a certain table? Or
a whole database?
sure
just use dbsize module from contrib.
depesz
I usually do the following:
for table tbl: select relpages * 8 from pg_class where relname = 'tbl' (This would give you an answer in KB)
for a db: select sum(relpages)* 8 from pg_class where relname not like 'pg_%'
Import Notes
Resolved by subject fallback
There is a Monitoring Disk Space section in the 7.3 docs.
---------------------------------------------------------------------------
Hubert Lubaczewski wrote:
On Wed, 25 Jun 2003 03:28:29 -0300
"Claudio Lapidus" <clapidus@hotmail.com> wrote:Is there a way to find out how much disk space is taking a certain table? Or
a whole database?sure
just use dbsize module from contrib.depesz
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073