Monday, December 3, 2012

MySQL Database Size check


Found this gem online today and thought i would share.  It shows the size in MB per database container for a MySQL database.

SELECT table_schema "Data Base Name",
sum( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;

No comments:

Post a Comment

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.