Calculate of view the MySQL Data table size

Wondering which tables are big in your MySQL database?
Plain and simple: run the following query on your database to calculate the table size in MegaBytes (MB) for your select MySQL database:

 select table_name, round(((data_length + index_length) / (1024*1024)),2) as 'size in megs' from information_schema.tables where table_schema = 'db_name';

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top