select
table_schema as '数据库',
table_name as '表名',
table_rows as '记录数',
truncate(data_length/1024/1024, 2) as '数据容量(MB)',
truncate(index_length/1024/1024, 2) as '索引容量(MB)'
from information_schema.tables where table_schema in (SELECT
table_schema
from information_schema.tables
group by table_schema)
order by 数据库,data_length desc
05-05
5572
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-08
544
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-22
1809
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-30
525
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)