ituser - 小小IT人遨游大大IT界

Mysql统计数据库中每个表所占的空间

2019-12-07 10:53:27 431次浏览


SELECT table_name AS "Tables",   round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"   FROM information_schema.TABLES   WHERE table_schema = '数据库名称'   ORDER BY (data_length + index_length) DESC;
说明

所有内容来及个人经验和互联网摘取,如有雷同纯属巧合,如有冒犯,欢迎留言,分享即快乐,感谢互联网中每一位懂得分享的ituser!QQ群:127331971(备注:ituser.cn)