SELECT
TABLE_NAME AS table_name,
TABLE_ROWS AS rows_count,
ROUND(DATA_LENGTH / 1024 / 1024, 2) AS data_size_mb,
ROUND(INDEX_LENGTH / 1024 / 1024, 2) AS index_size_mb,
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024, 2) AS total_size_mb
FROM
information_schema.TABLES
WHERE
TABLE_SCHEMA = 'your_db'
ORDER BY
total_size_mb DESC;