Re: Table size

From: Erik Jones <erik(at)myemma(dot)com>
To: lak <lakindia89(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Table size
Date: 2008-03-21 16:27:16
Message-ID: 7224B23D-6BF7-440D-8454-B4245C160107@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 21, 2008, at 4:33 AM, lak wrote:

> I have two questions.
> How can I enter comments into a table? Where the comments are stored?

Comments are created with the COMMENT sql command and, in pg, are
stored in pg_description.

> In psql How can I know the size of a single table?

pg_relation_size()

Often called as pg_size_pretty(pg_relation_size('some_table')) for
more readable output.

Use pg_total_relation_size() for the size with indexes and toast tables.

Erik Jones

DBA | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2008-03-21 16:27:38 Re: Table size
Previous Message Shane Ambler 2008-03-21 16:26:39 Re: Table size