mysql查看每张表的空间使用情况

use information_schema;
select table_name,concat(round(DATA_LENGTH/1024/1024,2),'MB') as data
,concat(round(index_length/1024/1024,2),'MB') as indexweight 
 from TABLES where table_schema='dsideal_db' order by  DATA_LENGTH desc;
原文地址:https://www.cnblogs.com/littlehb/p/4113382.html