Mysql表大小数据大小索引大小查询
SELECT CONCAT(ROUND((INDEX_LENGTH+DATA_LENGTH)/1024/1024, 2), 'MB') AS '总大小',CONCAT(ROUND(DATA_LENGTH/1024/1024, 2), 'MB') AS '数据大小',CONCAT(ROUND(INDEX_LENGTH/1024/1024, 2), 'MB') AS '索引大小' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='youwoapp(数据库名)' AND TABLE_NAME='account(表名)'