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

Getting last event in CTrigger.php is very slow

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.0.8rc1
    • API (A)

      Getting last event in CTrigger.php is very slow on installations with old PROBLEM triggers, because the query:

      			$lastEvents = DBfetchArrayAssoc(DBselect(
      				'SELECT '.$select.' FROM events e JOIN ('.
      					'SELECT  max(eventid) as lasteventid FROM events e'.
      					' WHERE '.dbConditionInt('e.objectid', $triggerids).
      						' AND '.DBin_node('e.objectid').
      						' AND e.object='.EVENT_SOURCE_TRIGGERS.
      						' AND e.value_changed='.TRIGGER_VALUE_CHANGED_YES.
      					' GROUP BY e.objectid'.
      				') ee ON e.eventid=ee.lasteventid'
      

      parse a lot of data from events table. For example it is slow for triggers which have events with age more 1-2 months.

            Unassigned Unassigned
            dotneft Alexey Pustovalov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: