Re: Table size

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Shyam Sunder Rai <ssrai(at)ismartpanache(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Table size
Date: 2007-06-14 13:16:21
Message-ID: 20070614131621.GA70209@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jun 14, 2007 at 06:10:15PM +0530, Shyam Sunder Rai wrote:
> How can I calculate a table size in postgres ?

To find the size of an existing table use pg_relation_size() or
pg_total_relation_size() (8.1 and later; in earlier versions use
the functions in contrib/dbsize).

http://www.postgresql.org/docs/8.2/interactive/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE

Or did you want to estimate the size of a table given the number
and types of its columns and the number of rows?

--
Michael Fuhr

In response to

  • Table size at 2007-06-14 12:40:15 from Shyam Sunder Rai

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Raul Retamozo 2007-06-14 13:38:44 copying tables from as400 to pg with dbi link
Previous Message Andreas 'ads' Scherbaum 2007-06-14 13:16:15 Re: Table size