com_select:
如果查询未命中高速缓存(检查sql语句并区分大小写)。 这个值加1。
如果查询中的数据发生变化,例如,某行被更新,则同一查询将被视为未命中,并将此值加1。
Qcache_hits :
如果查询发生并命中缓存,请将此值加1。
Qcache_inserts:
如果有新的sql语句,请将此值加1。 (如果为sql_no_cache,则不会将此值相加。)
如果查询的数据发生变化,例如,如果更新了某行,则同一查询也会被视为新查询,并将此值加1。
qps=com_select qcache_hits
如果sql语句使用变量,则认为mysql不是新的sql语句,但无法命中,增加com_select,并对Qcache_hits和Qcache_inserts
不做变化。
====================
TPS-transactionspersecond(1 (每秒传输的事务数),即服务器每秒处理的事务数,如果为InnoDB,则显示;如果没有InnoDB,则不显示。
TPS=(com_commitcom_rollback )/UPTIME
use information_schema;
select variable _ value into @ num _ comfromglobal _ statuswherevariable _ name=’com _ commit’;
select variable _ value into @ num _ rollfromglobal _ statuswherevariable _ name=’com _ roll back’;
select variable _ value into @ uptimefromglobal _ statuswherevariable _ name=’uptime’;
select(@num_com@num_roll )/@uptime;
QSqueriespersecond (每秒查询处理量) MyISAM引擎
QUESTIONS/UPTIME
use information_schema;
select variable _ value into @ num _ queriesfromglobal _ statuswherevariable _ name=’questions’;
select variable _ value into @ uptimefromglobal _ statuswherevariable _ name=’uptime’;
select @num_queries/@uptime;