mysql TPS和qps查询sql
TPS查询
select VARIABLE_VALUE into @num_com from GLOBAL_STATUS
where VARIABLE_NAME =’COM_COMMIT’;
select VARIABLE_VALUE into @num_roll from GLOBAL_STATUS
where VARIABLE_NAME =’COM_ROLLBACK’;
select VARIABLE_VALUE into @uptime from GLOBAL_STATUS
where VARIABLE_NAME =’UPTIME’;
select (@[email protected]_roll)/@uptime;
QPS查询
select VARIABLE_VALUE into @num_queries from GLOBAL_STATUS
where VARIABLE_NAME =’QUESTIONS’;
select VARIABLE_VALUE into @uptime from GLOBAL_STATUS
where VARIABLE_NAME =’UPTIME’;
select @num_queries/@uptime;