Re: Disk space occupied by a table in postgresql
| От | hubert depesz lubaczewski |
|---|---|
| Тема | Re: Disk space occupied by a table in postgresql |
| Дата | |
| Msg-id | 20080809091927.GA8430@depesz.com обсуждение исходный текст |
| Ответ на | Disk space occupied by a table in postgresql (aravind chandu <avin_friends@yahoo.com>) |
| Список | pgsql-general |
On Sat, Aug 09, 2008 at 12:18:46AM -0700, aravind chandu wrote:
> I installed postgresql on linux system, I create a
> table and inserted a large data into the table
> what I would like to know is how to calculate the
> disk space occupied by the table .Is there any
> procedure to find it out or simply a command
> .Please give me some suggestion.
select pg_relation_size('table_name');
or
select pg_total_relation_size('table_name');
both return size in bytes.
pg_total_relation_size includes disk space used by indexes and external
storage (long texts are kept not in table datafile, but in separate
"toast" tables).
Best regards,
depesz
--
Linked in: http://www.linkedin.com/in/depesz
jid/gtalk: depesz@depesz.com
aim: depeszhdl
skype: depesz_hdl
В списке pgsql-general по дате отправления: