mysql命令总结

统计全库数据量:

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';

 

posted @ 2016-11-01 22:25  xuxy03  阅读(179)  评论(0编辑  收藏  举报