MySQL统计数据库大小

select 
concat(truncate(sum(data_length)/1024/1024,2),'mb') as data_size, 
concat(truncate(sum(max_data_length)/1024/1024,2),'mb') as max_data_size, 
concat(truncate(sum(data_free)/1024/1024,2),'mb') as data_free, 
concat(truncate(sum(index_length)/1024/1024,2),'mb') as index_size
from information_schema.tables where table_schema = 'contract_ggpt';

  

posted @ 2018-02-27 15:04  仲卿  阅读(431)  评论(0编辑  收藏  举报