Slow SQL query in function addRelatedObjects (CTriggerGeneral.php)

XMLWordPrintable

    • Type: Incident report
    • Resolution: Cannot Reproduce
    • Priority: Major
    • None
    • Affects Version/s: 2.2.1
    • Component/s: Frontend (F)
    • Environment:

      Hi!
      I'm using Zabbix 2.2.1 on mid size environment.
      I see the big delay (about 5-6 sec) every time when zabbix is refreshing my top map containing all configured submaps and hosts.
      The root cause looks like slow SQL query in function addRelatedObjects (CTriggerGeneral.php).
      Attached in file.

      // adding hosts
      if ($options['selectHosts'] !== null && $options['selectHosts'] != API_OUTPUT_COUNT) {
              $res = DBselect(
                      'SELECT f.triggerid,i.hostid'.
                             ' FROM functions f,items i'.
                             ' WHERE '.dbConditionInt('f.triggerid', $triggerids).
                             ' AND f.itemid=i.itemid'
                      );
      

      I would appreciate any solution which allows to reduce delay less than 1-2 sec.
      Currently i'm using workaround when top map png is generated offline by curl script and users in NOC can see uninterrupted and quickly refreshing picture on the big screen.

            Assignee:
            Unassigned
            Reporter:
            Sergey Ermakov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: