mysql 查看数据库大小

select table_schema, concat(truncate(sum(data_length)/1024/1024,2),' mb') as data_size,
concat(truncate(sum(index_length)/1024/1024,2),'mb') as index_size
from information_schema.tables
where
table_schema = 'zx'
and table_name != 't_part_content'
group by table_schema
order by data_length desc;

posted @ 2016-07-14 16:57  carlo-z  阅读(350)  评论(0编辑  收藏  举报