Descobrindo tamanho de tabelas e índices no PostgreSQL

select schemaname as table_schema,       relname as table_name,       pg_size_pretty(pg_total_relation_size(relid)) as total_size,       pg_size_pretty(pg_relation_size(relid)) as data_size,       pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid))         as external_sizefrom pg_catalog.pg_statio_user_tablesorder by pg_total_relation_size(relid) desc,         pg_relation_size(relid) desc;

Referências

Listando tamanho de tabelas e indices
https://dataedo.com/kb/query/postgresql/list-of-tables-by-the-size-of-data-and-indexes

Documentação do pg_indexes
https://www.postgresql.org/docs/current/view-pg-indexes.html

Descobrindo espaço consumido - PostgreSQL Tutorial
https://www.postgresqltutorial.com/postgresql-database-indexes-table-size/

You should also read:

PostgreSQL

# Instalando o wget para fazer download da chave do repositório # Instalando o wget, capaz de fazer downloads de documentos via HTTP…