In this post, I am sharing one script to find total occupied size of each Storage Engine of MySQL Server.
MySQL Provides different types of storage engines like: MyISAM, InnoDB, Memory.
I have seen few questions on open MySQL Forum like: how to migrate MyISAM tables into InnoDB engines and what would be the storage size difference.
Periodically, Database Administrators have to check occupied size of each different MySQL Storage Engine which help them to take decisions on internal migration or for any other reason.
COUNT(*) AS TotalTableCount
,CONCAT(ROUND(SUM(table_rows)/1000000,2),'M') AS TotalRowCount
,CONCAT(ROUND(SUM(data_length)/(1024*1024*1024),2),'G') AS TotalTableSize
,CONCAT(ROUND(SUM(index_length)/(1024*1024*1024),2),'G') AS TotalTableIndex
GROUP BY ENGINE
ORDER BY SUM(data_length+index_length)
DESC LIMIT 10;
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.