mysql TPS和QPS查询sql

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 (@num_com+@num_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;

此条目发表在mysql分类目录,贴了, , 标签。将固定链接加入收藏夹。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注