PostgreSQLStorage
Database sizes
On-disk size of every non-template database, largest first.
Not yet verified. How scripts are tested
1SELECT datname,2 pg_size_pretty(pg_database_size(datname)) AS size3FROM pg_database4WHERE NOT datistemplate5ORDER BY pg_database_size(datname) DESC;Paste it into your query tool.
More PostgreSQL scripts: Storage
- Largest tables with index sizeTop 20 tables in the current database by total size, split into heap and index.