Computing Magazine

Check Database Tables Size in Mb

Posted on the 13 January 2016 by Akahgy

Description:

How can I check the size of my database tables and receive a human readaable result? This can be useful when deciding a storage architecture or a Cloud storage plan.

Solution:

From command line, go to mysql> terminal:

SELECT table_name AS “Table”, ROUND(((data_length + index_length) / 1024 / 1024), 2) AS “Size (MB)” FROM information_schema.TABLES WHERE table_schema = “database_name” ORDER BY (data_length + index_length) DESC;


Back to Featured Articles on Logo Paperblog