查询MySQL数据库中表中数据占用从的内存大小的命令

select 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 information_schema.tables
where table_schema=‘数据库名称’ AND table_name=‘表名称’;

猜你喜欢

转载自blog.csdn.net/longe20111104/article/details/89446151