select table_name, truncate(sum(data_length)/1024/1024,2) as data_size_MB,
truncate(sum(index_length)/1024/1024,2) as index_size_MB
from information_schema.tables where table_schema = ‘mob_report’
group by table_name
order by data_size_MB desc;
mysql查询各个表占用的内存大小
于 2022-08-15 12:08:15 首次发布