Monday , December 23 2024

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”.

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *