----- Mensagem original ----- > De: "Josef Šimánek" <josef.simanek@xxxxxxxxx> > Para: "luis.roberto" <luis.roberto@xxxxxxxxxxxxxxx> > Cc: "pgsql-general" <pgsql-general@xxxxxxxxxxxxxxxxxxxx> > 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