# Server status variables - Queries - intermittent spikes

**URL:** <https://forums.percona.com/t/server-status-variables-queries-intermittent-spikes/5145>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [October 12, 2016, 7:48am UTC](https://forums.percona.com/t/server-status-variables-queries-intermittent-spikes/5145 "2016-10-12T07:48:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrdr](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mrdr](https://forums.percona.com/u/mrdr)\
**Post date:** [October 12, 2016, 7:48am UTC](https://forums.percona.com/t/server-status-variables-queries-intermittent-spikes/5145/1 "2016-10-12T07:48:47Z")

</div>

Hi!

We’re polling the “Queries” status variable once a minute and divide the difference by 60 to get queries per second and this is giving warnings and alerts when the value is high (check\_mk Nagios plugin). The problem is that we have sharp spikes in the monitoring tool. See attached picture. I’ve manually polled (show global status) and compared the differences for the COM\_xxx-variables, the Qcache\_hits-variable, the Questions variable and finally the Queries variable. I’ve come to the conclusion that none of the COM\_xxx-variable, the Qcache\_hits variable or the Questions variable could be the root cause of spikes in the Queries monitoring. The reason for caring about COM\_xxx and Qcache\_hits is this relationship:

SUM(Com\_xxx) + Qcache\_hits = Queries As stated here: [url][http://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html[/url]](http://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html%5B/url%5D)

Question 1) How can we see spikes for the Queries variable without this being reflected in any COM\_xxx-variable or the Qcache\_hits variable?

Question 2) Why doesn’t the above mentioned relationship always hold? I.e. the total of COM\_xxx-variables plus Qcache\_hits doesn’t equal to the value of the Queries variable. We’ve seen examples where Queries is only half of the value of the total of the others.

Best regards

David

![photoid=46138](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/d/da893db1a2df8d4753a7f07dbe59f270afc272bc.jpeg)
