Обсуждение: Finding out db size...

Поиск
Список
Период
Сортировка

Finding out db size...

От
Christopher.Becker@apcc.com
Дата:



Is there any possible way to do a SQL query to return some sort of
representation of how large the entire db is? Or even how large a single
table is?


Re: Finding out db size...

От
Bruce Momjian
Дата:
See the administration chapter of the docs on analyzing disk space.

Christopher.Becker@apcc.com wrote:
>
>
>
>
> Is there any possible way to do a SQL query to return some sort of
> representation of how large the entire db is? Or even how large a single
> table is?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Finding out db size...

От
Devrim GUNDUZ
Дата:
Hi,

On Fri, 30 Apr 2004 Christopher.Becker@apcc.com wrote:

> Is there any possible way to do a SQL query to return some sort of
> representation of how large the entire db is? Or even how large a single
> table is?

See contrib/dbsize

Regards,
--
Devrim GUNDUZ
devrim~gunduz.org                devrim.gunduz~linux.org.tr
            http://www.TDMSoft.com
            http://www.gunduz.org


Re: Finding out db size...

От
Adam Witney
Дата:
If you install the dbsize extension in the contrib directory for the source
code, then you can run queries like this

SELECT database_size('my_database');
SELECT relation_size('my_table');

HTH

adam


>
> Is there any possible way to do a SQL query to return some sort of
> representation of how large the entire db is? Or even how large a single
> table is?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.