QPS = Questions/Uptime
每秒钟获得的查询数量,也可以是全部查询的数量
show global status like 'Questions';
查询mysql的总启动时间
show global status like 'Uptime';
TPS = (Com_commit + Com_rollback) / Uptime
show global status like 'Com_rollback'
show global status like 'Com_commit'
show global status like 'Uptime'
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命中率
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 'Thread%';
show status like 'Connections';