FAQ
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

Search Discussions

  • Hubert Lubaczewski at Jun 25, 2003 at 6:35 am

    On Wed, 25 Jun 2003 03:28:29 -0300 "Claudio Lapidus" 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
  • Bruce Momjian at Jun 25, 2003 at 2:33 pm
    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" 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
  • Yusuf at Jun 25, 2003 at 1:29 pm
    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_%'

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-general @
categoriespostgresql
postedJun 25, '03 at 6:28a
activeJun 25, '03 at 2:33p
posts4
users4
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase