-
Problem report
-
Resolution: Won't fix
-
Minor
-
None
-
4.0.12
-
Debian 10, 4GB RAM, 4 vCPU, Zabbix 4.0.12, SAS RAID 1, 306 values/sec
I'm experiencing problem with frontend widget of type Problems - History. In widget settings (complete screen in attachment) I'm requesting last 50 problems, however, SQL query has set LIMIT 1001 which is causing DB overload (executing query takes > 30s in my environment). I think this query should be optimized.
Zabbix is running this query:
SELECT e.eventid,e.objectid,e.clock,e.ns,e.name,e.severity FROM events e WHERE e.source='0' AND e.object='0' AND e.severity IN (3,4,5) AND NOT EXISTS (SELECT NULL FROM event_suppress es WHERE es.eventid=e.eventid) AND e.value=1 ORDER BY e.eventid DESC LIMIT 1001