解析mysql中如何获得数据库的大小
程序员文章站
2024-02-22 19:40:46
1.查看mysql数据库大小select sum(data_length)+sum(index_length)from information_schema.tables...
1.查看mysql数据库大小
select sum(data_length)+sum(index_length)
from information_schema.tables where table_schema='数据库名';
得到的结果是以字节为单位,除1024为k,除1048576(=1024*1024)为m。
2.查看表的最后mysql修改时间
select table_name,update_time from information_schema.tables where table_schema='数据库名';
可以通过查看数据库中表的mysql修改时间,来确定mysql数据库是否已经长期不再使用。
上一篇: maven学习-初窥门径
下一篇: C#程序窗体间使用回调事件方式通讯示例
推荐阅读
-
解析mysql中如何获得数据库的大小
-
如何在Java程序中访问mysql数据库中的数据并进行简单的操作
-
php读取mysql数据库中的html数据代码,如何读取
-
浅谈MySQL 数据库中如何解决分组统计的问题_MySQL
-
mysql-请教数据库大神,MySQL中的point类型数据取出来之后如何转化为字符串在后台使用?
-
如何在Java程序中访问mysql数据库中的数据并进行简单的操作
-
获得的数据如何存不数据库(mysql)里,与数据库端口?请高人指点,多谢
-
mysql中对已经存在的用户名如何指定仅可以访问某一个或指定多个数据库,别的数据库限制无法访问无法读到
-
MySQL数据库搜索中的大小写敏感性_MySQL
-
如何获得配置文件中,连接数据库的连接字符串