-
Incident report
-
Resolution: Cannot Reproduce
-
Major
-
None
-
2.0.3
It appears that the used query:
===
select value from history_uint where itemid=16617 and clock>1353413817 and clock<=1353417417 order by clock desc limit 2
===
is extremely slow. Its hitting the MySQL "slow query" limit (it takes 80+ seconds to execute) and causing our Zabbix server to have a high load and become generally unresponsive.
One of our developers have optimized this query, which turned this slow query into one that executes within a second:
===
select t.value
from (select value, clock
from history_uint
where itemid=16617) t
where 0 < IF(t.clock between 1353413817 and 1353417417, 1, 0)
order by t.clock desc
limit 3;
===
Its probably a good idea to update this query in Zabbix by-default?