One - One Code All

Blog Content

统计mysql数据库表占用内存大小

MySQL   2013-08-18 10:04:16

统计mysql数据库表占用内存大小:


select concat(round(sum(data_length/1024/1024),2),'MB') as data_length_MB,

concat(round(sum(index_length/1024/1024),2),'MB') as index_length_MB

from information_schema.tables

where table_schema='dbname' AND table_name='tablename';



上一篇:"Mysql has gone away"的几种可能
下一篇:MySQL字符串函数substring:字符串截取

The minute you think of giving up, think of the reason why you held on so long.