mysql查询数据库中每一张表的内存大小

SELECT TABLE_NAME,DATA_LENGTH+INDEX_LENGTH,TABLE_ROWS,concat(round((DATA_LENGTH+INDEX_LENGTH)/1024/1024,2), 'MB') as data FROM information_schema.tables WHERE TABLE_SCHEMA='test' ORDER BY DATA_LENGTH+INDEX_LENGTH desc;

结果展示:

 

posted @ 2019-05-15 23:57  kerala  阅读(1570)  评论(1编辑  收藏  举报