Mysql All tables sizes query

SELECT
TABLE_NAME AS Table,
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS Size (MB)
FROM
information_schema.TABLES
GROUP BY TABLE_NAME
ORDER BY
(DATA_LENGTH + INDEX_LENGTH)
DESC;

Leave a Reply

Your email address will not be published. Required fields are marked *