灵易深论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 256|回复: 0

查询Mysql各张表的容量

[复制链接]

101

主题

29

回帖

302

积分

超级版主

积分
302
发表于 2023-8-9 08:05:48 | 显示全部楼层 |阅读模式
查询Mysql各张表的容量
Select
table_schema as '数据库',
table_name as '表名',
table_rows as '记录数',
truncate(data_length/1024/1024, 2) as '数据容量MB)',
truncate(index_length/1024/1024, 2) as '索引容量MB)'
from information_schema.tables
where table_schema='shunsync'
order by table_rows desc, index_length desc;

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|灵易深论坛 ( 沪ICP备2020036158号-2 )

GMT+8, 2025-6-22 01:02 , Processed in 0.014385 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表