作用:
统计mysql数据库中 innodb引擎的表各自的表的大小,数据的大小,索引的大小,行数
- SELECT table_schema,table_name, table_rows, \
- ROUND((data_length+index_length)/1024/1024) AS total_mb, \
- ROUND(data_length/1024/1024) AS data_mb, \
- ROUND(index_length/1024/1024) AS index_mb \
- FROM INFORMATION_SCHEMA.TABLES WHERE engine='InnoDB';
阅读(1136) | 评论(0) | 转发(0) |