查看指定数据库各表容量大小
例:查看mysql库各表容量大小
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='mysql'
order by data_length desc, index_length desc;
版权声明:本文为傲雪星枫博主原创文章,遵循 CC 4.0 BY-SA 版权协议
原文链接:
https://blog.csdn.net/fdipzone/article/details/80144166