13 October 2015

Size of Table in MySQL Schema

You can run this to get an estimated table size in name_of_database_schema.
SELECT table_name AS "Tables", engine, round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "name_of_database_schema"
ORDER BY (data_length + index_length) DESC;