mysql中查看数据表占的存储空间

来源:转载

在mysql中查看数据库中各表所占用的存储空间


use information_schema;
select table_name,concat(round(sum(data_length/1024/1024),2),'MB') as data_length_MB,
concat(round(sum(index_length/1024/1024),2),'MB') as index_length_MB
from tables where
table_schema='dbname'
group by table_name;

分享给朋友:
您可能感兴趣的文章:
随机阅读: