So Guys, how do you calculate the size of your databases on db server using a simple & single query..
.
.
.
Well this thing is easily achievable by a simple query. For this you need to query information_schema, which will result you the database size and other information.
:)
.
.
.
Well this thing is easily achievable by a simple query. For this you need to query information_schema, which will result you the database size and other information.
SELECT table_schema "DB Name", ROUND(SUM(data_length + index_length) / 1024 / 1024 / 1024, 1) "DB Size in GB"
FROM information_schema.tables GROUP BY table_schema;
:)
No comments:
Post a Comment