Server status variables - Queries - intermittent spikes


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:

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