查询数据库每个表占用的大小

SELECT TABLE_NAME,DATA_LENGTH+INDEX_LENGTH,TABLE_ROWS,concat(round((DATA_LENGTH+INDEX_LENGTH)/1024/1024,2), 'MB') as data_size FROM information_schema.Tables WHERE TABLE_SCHEMA='库名';

posted @ 2018-09-25 09:05  洋葱土豆随心匠  阅读(471)  评论(0编辑  收藏  举报