Site icon Database Tutorials

How To Get Size Of All Tables And Database On PostgreSQL

 

In a Cluster you can list all the databases and their sizes withe below script.

I prefer one application db for a cluster generally.

Because postgresql more  appropriate for this. I suggest you too the same thing.

 

You can also use the following script to list schema names in a database.

 

You can use the following script to list the size of all tables in a schema.

You should write your own schema name at “filter_schemaname_by_writing_your_schemaname_here”.

Exit mobile version