2020
10-07
10-07
Mysql 查询数据库容量大小的方法步骤
查询所有数据库的总大小方法如下:mysql>useinformation_schema;mysql>selectconcat(round(sum(DATA_LENGTH/1024/1024),2),'MB')asdatafromTABLES;+-----------+|data|+-----------+|3052.76MB|+-----------+1rowinset(0.02sec)统计一下所有库数据量每张表数据量=AVG_ROW_LENGTH*TABLE_ROWS+INDEX_LENGTHSELECTSUM(AVG_ROW_LENGTH*TABLE_ROWS+INDEX_LENGTH)/1024/1024AStotal_mbFROMinformation_schema.TAB...
继续阅读 >