How to get size of each table of a MySQL Database

19

This SQL query provides you with list of all tables with largest size in a MySQL database that is executed.

SELECT table_schema AS `Database` , table_name AS `Table` , ROUND( (

(
data_length + index_length
) /1024 /1024 ) , 2
) `Size in MB` 
FROM information_schema.TABLES
ORDER BY (

data_length + index_length
) DESC ;

LIMIT 0 , 30



Related Articles & Comments

Menu Title
%d bloggers like this: