SELECT TABLE_NAME,DATA_LENGTH,INDEX_LENGTH,(DATA_LENGTH+INDEX_LENGTH)
as length,TABLE_ROWS,concat(round((DATA_LENGTH+INDEX_LENGTH)/1024/1024,3),
'MB') as total_size FROM
information_schema.TABLES WHERE TABLE_SCHEMA='库名'
order by length desc;
mysql查看库里的表存储占用情况
最新推荐文章于 2024-08-23 17:37:15 发布