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

Slow SQL query in function addRelatedObjects (CTriggerGeneral.php)

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 2.2.1
    • Frontend (F)

      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.

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

              Created:
              Updated:
              Resolved: