SELECT
table_schema AS Database
,
table_name AS Table
,
round(((data_length + index_length) / 1024 / 1024), 2) Size in MB
FROM information_schema.TABLES
ORDER BY Size in MB
DESC;
查询mysql所有表的大小
最新推荐文章于 2024-07-22 03:04:41 发布
SELECT
table_schema AS Database
,
table_name AS Table
,
round(((data_length + index_length) / 1024 / 1024), 2) Size in MB
FROM information_schema.TABLES
ORDER BY Size in MB
DESC;