From: luis.roberto@siscobra.com.br
To: Josef Šimánek <josef.simanek@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: DB size
Date: Mon, 26 Apr 2021 17:50:49 -0300 (BRT)
Message-ID: <2041416999.3216513.1619470249110.JavaMail.zimbra@siscobra.com.br> (raw)
In-Reply-To: <CAFp7Qwp6bECyd_UzELAFfTQ=gxvzEV_ZerixU9m9UPZrjS6_Hw@mail.gmail.com>
References: <133123052.3128057.1619468694515.JavaMail.zimbra@siscobra.com.br>
<CAFp7Qwp6bECyd_UzELAFfTQ=gxvzEV_ZerixU9m9UPZrjS6_Hw@mail.gmail.com>
----- Mensagem original -----
> De: "Josef Šimánek" <josef.simanek@gmail.com>
> Para: "luis.roberto" <luis.roberto@siscobra.com.br>
> Cc: "pgsql-general" <pgsql-general@lists.postgresql.org>
> Enviadas: Segunda-feira, 26 de abril de 2021 17:40:05
> Assunto: Re: DB size
> Do you have any indexes in mydb database?
Yes, I do. I believe pg_total_relation_size accounts for these. These are the results for my biggest table:
SELECT pg_table_size('my_table'),
pg_size_pretty(pg_table_size('my_table')) AS tb_pretty,
pg_indexes_size('my_table'),
pg_size_pretty(pg_indexes_size('my_table')) AS idx_pretty,
pg_total_relation_size('my_table'),
pg_size_pretty(pg_total_relation_size('my_table')) AS total_pretty
pg_table_size|tb_pretty|pg_indexes_size|idx_pretty|pg_total_relation_size|total_pretty|
-------------+---------+---------------+----------+----------------------+------------+
82016485376|76 GB | 88119033856|82 GB | 170135519232|158 GB |
Luis R. Weck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: luis.roberto@siscobra.com.br, josef.simanek@gmail.com
Subject: Re: DB size
In-Reply-To: <2041416999.3216513.1619470249110.JavaMail.zimbra@siscobra.com.br>
References: <133123052.3128057.1619468694515.JavaMail.zimbra@siscobra.com.br> <CAFp7Qwp6bECyd_UzELAFfTQ=gxvzEV_ZerixU9m9UPZrjS6_Hw@mail.gmail.com> <2041416999.3216513.1619470249110.JavaMail.zimbra@siscobra.com.br>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox