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

60s+ Alerts / Events Query on large system

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.4.5
    • Fix Version/s: None
    • Component/s: Frontend (F)
    • Environment:
      Debian / MySQL

      Description

      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)

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: