How to get the sizes of the tables of a MySQL database

PHOTO EMBED

Sat Feb 12 2022 23:13:25 GMT+0000 (Coordinated Universal Time)

Saved by @Maga #mysql

SELECT table_name ,
  round(((data_length + index_length) / 1024 / 1024), 2) as SIZE_MB
FROM information_schema.TABLES
WHERE table_schema = DATABASE() ORDER BY SIZE_MB DESC;
content_copyCOPY

https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database