select
table_schema, table_name,
table_rows, -- 表数据行数
round(sum(data_length)/1024/1024,2) data_size, -- 表数据所占空间大小(M)
round(sum(index_length)/1024/1024,2) index_size -- 表索引所占空间大小(M)
from information_schema.tables
group by table_schema, table_name
order by data_size desc