SELECT table_schema AS '数据库', table_name AS '表名', table_rows AS '记录数',
TRUNCATE(data_length / 1024 / 1024, 2) AS '数据容量(MB)',
TRUNCATE
(index_length / 1024 / 1024, 2) AS '索引容量(MB)'
FROM
information_schema.tables
WHERE
table_schema = '填写要查询的数据库名称'
ORDER BY
data_length DESC,
index_length DESC;
MySQL:SQL查看表占用空间
最新推荐文章于 2024-06-07 10:23:08 发布
3995

被折叠的 条评论
为什么被折叠?



