如何查看MySQL数据库表容量的大小
发表于:2024-09-30 作者:千家信息网编辑
千家信息网最后更新 2024年09月30日,本文主要给大家介绍如何查看MySQL数据库表容量的大小,文章内容都是笔者用心摘选和编辑的,具有一定的针对性,对大家的参考意义还是比较大的,下面跟笔者一起了解下如何查看MySQL数据库表容量的大小吧。1
千家信息网最后更新 2024年09月30日如何查看MySQL数据库表容量的大小
本文主要给大家介绍如何查看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;
看完以上关于如何查看MySQL数据库表容量的大小,很多读者朋友肯定多少有一定的了解,如需获取更多的行业知识信息 ,可以持续关注我们的行业资讯栏目的。
容量
数据
数据库
大小
索引
笔者
行业
信息
内容
库容
库容量
意义
文章
更多
朋友
栏目
知识
读者
资讯
还是
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库被删勒索
在线服务器压力测试工具网站
win2003服务器版
遍历接收到的数据库
手机远程查询电脑数据库吗
政府单位网络安全建设方案
锐游网络技术有限公司南京
软件开发开发公司的
万全服务器raid
网络安全问题情侣对戒
搭建微软portal服务器
oracle数据库看表结构
福建企业软件开发系统
EI数据库自动取词根是
本单位网络安全
数据库的备份恢复软件
数据库sql修改数据序号
任天堂账号选什么服务器
国服泰拉瑞亚怎么进服务器
网络安全漏洞扫描方法
湛江手机软件开发电话
网络安全协议红线违规
软件开发接单软件
软件开发立项报告范本
ifix数据库管理器中
超跌互联网科技股
网络安全助理主要工作
境外网络安全认证
厦门手机软件开发哪家好
学金融的软件开发