Re: how to know a table size ?

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how to know a table size ?
Date: 2007-03-28 17:15:31
Message-ID: 20070328171531.GA25737@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Wed, dem 28.03.2007, um 19:02:40 +0200 mailte Alain Roger folgendes:
> Hi,
>
> I would like display in my PHP application the size of each table.
> So, how can i get the table size (for example in Mb) ?

There are some functions, read:
http://www.postgresql.org/docs/current/interactive/functions-admin.html

For instance: pg_database_size(name), pg_relation_size(text),
pg_total_relation_size(text)

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Vanasco 2007-03-28 18:09:16 Re: tweaks for write-intensive dbs ?
Previous Message Alain Roger 2007-03-28 17:02:40 how to know a table size ?