SELECT table_schema,table_name,
round(data_length/1024/1024/1024,1) as data_length,
round(index_length/1024/1024/1024,1) as index_length,
round(data_length/1024/1024/1024,1)+round(index_length/1024/1024/1024,1) as total_length,
table_rows
FROM information_schema.tables
order by total_length desc
limit 100;
查询mysql表占内存大小和行数
最新推荐文章于 2023-04-07 15:22:28 发布