mysql:数据库,表大小问题

时间:2014-03-17 16:15:25   收藏:0   阅读:515

 

 

mysql :

1.查询某个数据库的大小
select concat(round((sum(DATA_LENGTH)+sum(INDEX_LENGTH))/1024/1024/1024,2),‘G‘) from information_schema.tables 
where table_schema=‘数据库名‘;

 

2.查询某个表的大小
select concat(round((sum(DATA_LENGTH)+sum(INDEX_LENGTH))/1024/1024/1024,2),‘G‘) from information_schema.tables 
where table_schema=‘数据库名‘ and table_name=’表名’

 

 

本文出自 “SQLServer MySQL” 博客,请务必保留此出处http://dwchaoyue.blog.51cto.com/2826417/1378001

mysql:数据库,表大小问题,布布扣,bubuko.com

原文:http://dwchaoyue.blog.51cto.com/2826417/1378001

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!