Find the table sizes in MySQL database


You would like to have a list with all the tables in an MySQL database, sorted with their sizes (actual table and indices).


You could run the following query to give you a list of all the tables sorted by size:

  table_schema AS database_name,
  table_name AS table_name,
  round(((data_length + index_length) / 1024 / 1024), 2) AS size_mb
FROM information_schema.TABLES
ORDER BY (data_length + index_length) DESC;

Take from the answer here