如何查看MySQL数据库表容量大小
发表于:2024-09-30 作者:千家信息网编辑
千家信息网最后更新 2024年09月30日,如何查看MySQL数据库表容量大小?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。1.查看所有数据库容量大小select
千家信息网最后更新 2024年09月30日如何查看MySQL数据库表容量大小
如何查看MySQL数据库表容量大小?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。
1.查看所有数据库容量大小
select table_schema as '数据库',sum(table_rows) as '记录数',sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)',sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'from information_schema.tablesgroup by table_schemaorder by sum(data_length) desc, sum(index_length) desc;
2.查看所有数据库各表容量大小
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.tablesorder by data_length desc, index_length desc;
3.查看指定数据库容量大小
例:查看mysql库容量大小
select table_schema as '数据库',sum(table_rows) as '记录数',sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)',sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'from information_schema.tableswhere table_schema='mysql';
4.查看指定数据库各表容量大小
例:查看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.tableswhere table_schema='mysql'order by data_length desc, index_length desc;
看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注行业资讯频道,感谢您对的支持。
容量
数据
数据库
大小
索引
帮助
清楚
内容
对此
库容
库容量
文章
新手
更多
知识
行业
资讯
资讯频道
难题
需求
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
佛山市神龟网络技术
删除数据库表的字段
异业联盟软件开发多少钱
教育网络安全处罚
网络安全传输介质的安全性
一玩游戏就断开服务器
哪个软件开发可靠
网络安全性存在的风险有什么
山东机械软件开发平台
sql语句创建数据库的关键字
控制软件联网 软件开发
搭建mqtt物联网服务器
僵尸毁灭工程服务器管理员
呈贡区参考软件开发咨询报价
网络安全为主题板报
信息网络安全测试内容
搭建渲染服务器
cqk620服务器不能pxe
数据库设计的基础步骤是
关于网络安全的资料
数据库错误824
完美获取社区服务器失败
温州数据库防伪技术
国外数据库营销
宿州 软件开发招聘
服务器时不时重启怎么解决
网络技术人员技术职称制度
马云互联网金融科技创新讲话
长圣软件开发有限公司
软件开发单项资质认证费用