美文网首页
查看所有数据库各表容量大小

查看所有数据库各表容量大小

作者: 軒晨翔 | 来源:发表于2019-02-15 11:16 被阅读0次

select

table_schema as '数据库',

table_name as '表名',

table_rows as '记录数',

truncate(data_length/1024/1024, 2) as '数据容量(MB)',

truncate(index_length/1024/1024, 2) as '索引容量(MB)'

from information_schema.tables

order by data_length desc, index_length desc;

相关文章

网友评论

      本文标题:查看所有数据库各表容量大小

      本文链接:https://www.haomeiwen.com/subject/fjdpeqtx.html