查看MySQL中最大的表和其索引文件的大小

用这条语句可以查询出MySQL中最大的表和其索引文件的大小.

这样就能方便的监控MySQL,查看哪个表或其索引出现异常.

SELECT concat(table_schema,’.',table_name),concat(round(table_rows/1000000,2),’M') rows,concat(round(data_length/(1024*1024*1024),2),’G') DATA,concat(round(index_length/(1024*1024*1024),2),’G') idx,concat(round((data_length+index_length)/(1024*1024*1024),2),’G


作者: sss0213   发布时间: 2010-11-11