In this post, I am sharing one useful DBA script to find largest databases on MySQL Server.
What I am feeling is, this kind of handy script always useful while DBA requires quick monitoring on the Database Server.
So, I am always finding this kind of script and sharing here to make DBA task easier.
I have prepared few calculated columns with the help of information_schema.TABLES.
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 table_schema
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.