Mysql Table Filesize

Last modified: 
Friday, May 1st, 2015
Topics: 
MySQL

Find the approximate file size of all tables in a MySQL database

SELECT TABLE_NAME AS "Table name",
  ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) as MB
FROM INFORMATION_SCHEMA.TABLES 
WHERE TABLE_SCHEMA IN ('mydatabase') 
GROUP BY TABLE_NAME
ORDER BY MB ASC;


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.