0

Picked up that one of the DB is using a lot of space.

what is the best script or stored procedure which returns details information to see which table is using the most space?

is there a log maybe that shows which application added the data on the system logs?

1 Answers1

0

Please see this question that has been asked previously: postgresql list and order tables by size.

TL;DR try the below:

select table_schema, table_name, pg_relation_size('"'||table_schema||'"."'||table_name||'"')
from information_schema.tables
order by 3 desc
Rupert
  • 150
  • 1
  • 6