本文共 376 字,大约阅读时间需要 1 分钟。
1、查看指定库的大小
use information_schema;select concat(round(sum(data_length/1024/1024),2),'mb') as data from tables where table_schema='testdb';2、查看指定表的大小
select concat(round(sum(data_length/1024/1024),2),'mb') as data from tables where table_schema='testdb' and table_name='test';3、查看所有表的大小
select data_length/1024/1024,table_name as data from tables where table_schema='testdb';
转载地址:http://owklj.baihongyu.com/