统计全库数据量:
use information_schema; SELECT TABLE_NAME, (DATA_LENGTH/1024/1024) as DataM , (INDEX_LENGTH/1024/1024) as IndexM, ((DATA_LENGTH+INDEX_LENGTH)/1024/1024) as AllM, TABLE_ROWS FROM TABLES WHERE TABLE_SCHEMA = 'database_name';
本文共 281 字,大约阅读时间需要 1 分钟。
统计全库数据量:
use information_schema; SELECT TABLE_NAME, (DATA_LENGTH/1024/1024) as DataM , (INDEX_LENGTH/1024/1024) as IndexM, ((DATA_LENGTH+INDEX_LENGTH)/1024/1024) as AllM, TABLE_ROWS FROM TABLES WHERE TABLE_SCHEMA = 'database_name';
转载于:https://www.cnblogs.com/xuxy03/p/6021273.html