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)',
truncate(data_length/1024, 2)+truncate(index_length/1024, 2) as '容量(KB)',
truncate((truncate(data_length/1024, 2)+truncate(index_length/1024, 2) )/table_rows,2) as '行长度(KB)'
from information_schema.tables
where table_schema='robot_flydb'
order by data_length desc, index_length desc;
如果您觉得好看,请点个“在看”↓↓↓
文章转载自IT民工2020,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。