MySQL数据库性能检查
来源:互联网 发布:coc熔岩猎犬升级数据 编辑:程序博客网 时间:2024/04/28 23:26
线程独享内存
show global variables like ‘%buffer%’;
线程共享内存
show global variables like '%cache%';
QPS(每秒Query量)
QPS = Questions(or Queries) / secondsshow status like ‘Questions’;
TPS
TPS = (Com_commit + Com_rollback) / secondsshow status like ‘Com_commit’;show status like ‘Com_rollback’;
key Buffer命中率
key_buffer_read_hits = (1-key_reads / key_read_requests) * 100%
key_buffer_write_hits = (1-key_writes / key_write_requests) * 100%
show status like ‘Key%’;
innodb_buffer_read_hits = (1 - innodb_buffer_pool_reads /innodb_buffer_pool_read_requests) * 100%
show status like ‘innodb_buffer_pool_read%’;
Query Cache命中率
Query_cache_hits = (Qcahce_hits / (Qcache_hits + Qcache_inserts )) * 100%;
show status like ‘Qcache%’;
Table Cache状态量
show status like ‘open%’;
Thread Cache命中率
Thread_cache_hits = (1 - Threads_created / connections ) * 100%
show status like ‘Connections’;show status like ‘Thread%’;
连接数
show variables like 'max_connections';show global status like 'max_used_connections';
临时表
show global status like 'created_tmp%';
排序使用情况
show global status like 'sort%';
表锁情况
show global status like 'table_locks%';
表扫描情况
show global status like 'handler_read%';
调出服务器完成的查询请求次数
show global status like 'com_select';
Binlog Cache使用状况
show status like ‘Binlog_cache%’;
Innodb_log_waits量
show status like ‘innodb_log_waits’;
查询mysql中所有数据库占用磁盘空间大小
select table_schema,concat(truncate(sum(data_length)/1024/1024,2),' MB') as data_size,concat(truncate(sum(index_length)/1024/1024,2),' MB') as index_sizefrom information_schema.tablesgroup by table_schemaorder by data_length desc;
查询单个库中所有表的大小
select table_name,concat(truncate(data_length/1024/1024,2),' MB') as data_size,concat(truncate(index_length/1024/1024,2),' MB') as index_sizefrom information_schema.tables where table_schema="mrj"group by table_nameorder by data_length desc;
阅读全文
0 0
- MySQL数据库性能检查
- mysql 数据库状态检查
- 日常数据库性能检查机制
- mysql性能检查脚本-部分
- 检查Mysql数据库的编码
- 几个检查数据库性能的SQL语句
- oracle 数据库性能健康检查脚本[转帖]
- (转)数据库常规性能检查
- mysql性能的检查和优化方法
- MYSQL数据库性能测试报告
- MySQL 数据库性能优化
- 提高MySQL 数据库性能
- MySQL 数据库 性能监控
- 数据库性能优化(MySQL)
- 优化MySQL数据库性能
- MySQL数据库性能优化
- MySQL 数据库性能优化
- MYSQL数据库性能测试报告
- Java常见面试(1)
- HDU 2030 汉字统计
- Vue项目中的倒计时,使用Vuex轻松解决(focusdroid)
- UVa11552 Fewest Flops
- 文章标题
- MySQL数据库性能检查
- 树莓派-一不小心把树莓派的任务栏删了,如何恢复
- Lock和synchronized比较详解
- 移除集合中的对象
- 使用spring-data-redis实现incr自增
- 简单的购物车和购物车结算
- Java常见面试(9)
- Threejs学习笔记之五几何体
- 分布式_基础