Определение размеров таблиц в базе данных PostgreSQL
SELECT tableName, pg_size_pretty(pg_total_relation_size(CAST(tablename as text))) as size
from pg_tables
where tableName not like 'sql_%'
order by size;
SELECT tableName, pg_size_pretty(pg_total_relation_size(CAST(tablename as text))) as size
from pg_tables
where tableName not like 'sql_%'
order by size;