Re: Table size

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Benjamin Krajmalnik <kraj(at)illumen(dot)com>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Table size
Date: 2010-02-05 10:57:17
Message-ID: 4B6BF98D.3000503@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Benjamin Krajmalnik wrote:
>
> In pgAdmin, one can view the total disk size occupied by a table in
> the statistics view when in the “Tables” context.
>
> What query is being used to calculate this?
>
> I have found pg_relation_size() but it has to be called for multiple
> entities in order to arrive at the total utilization.
>

I believe it's using pg_total_relation_size() there:
http://www.postgresql.org/docs/current/interactive/functions-admin.html

There are some sample queries to compute disk use information in a
couple of different forms at http://wiki.postgresql.org/wiki/Disk_Usage
you might find handy too.

--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com

In response to

  • Table size at 2010-02-05 02:38:40 from Benjamin Krajmalnik

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Farrer, Rhys 2010-02-05 17:06:33 a quick question
Previous Message Abhisekh Mohapatro 2010-02-05 05:50:34 how to view TOAST table