MySQL统计数据表大小

SELECT table_name, data_length + index_length AS len, table_rows,
 
     CONCAT(ROUND((data_length + index_length)/1024/1024,2),'MB') AS datas
 
FROM information_schema.tables
 
WHERE table_schema = '数据库名'
 
ORDER BY len DESC;
posted @ 2021-04-25 16:57  weiniWang  阅读(90)  评论(0编辑  收藏  举报