Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-9637

60s+ Alerts / Events Query on large system

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 2.4.5
    • Frontend (F)
    • Debian / MySQL

      When loading tr_events.php on a large system the query to fetch the alerts is poorly optimized and results in a 60s+ load time.

      SELECT a.* FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='0' AND e.object='0') AND (a.alertid BETWEEN '1591062' AND '1591074' OR a.alertid IN ('1590893','1591357')) ORDER BY a.clock DESC

      It seems to be doing a full table scan on the events table (20m records)

            Unassigned Unassigned
            splitice Mathew
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: