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

Slow Query In Graph Widget in Version 7.x - Regression from 6.4.x

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.7
    • Frontend (F)
    • None

      Prior to upgrading to version 7.0.4 I was running Zabbix version 6.4.12. In a graph widget I had a host pattern filter of 'regionA' and an item pattern. I know that regionA will match about 1400 hosts in my Zabbix instance. This query is taking significantly longer in version 7.0.4 than it did in version 6.4.12

      Zabbix 7.0.4 Query:
      SELECT i.itemid,i.hostid,i.history,i.trends,i.units,i.value_type,COALESCE(irn.name_resolved,'') AS name_resolved,i.name FROM items i LEFT JOIN item_rtname irn ON i.itemid=irn.itemid WHERE i.flags IN (0,4) AND (i.hostid IN (<batch of hostids...>) OR i.hostid IN (<another batch of hostids...>) OR i.hostid IN (<another batch of hostids...>)) AND ((irn.name_resolved_upper LIKE 'RESTART COUNT - QUERY!_PROCESS' ESCAPE '!')) AND i.value_type IN (0,3) ORDER BY i.name LIMIT 10000

      (32.70 sec)

       

      Zabbix 6.4.12 Query:

      SELECT i.itemid,i.hostid,i.name,i.history,i.trends,i.units,i.value_type FROM items i WHERE i.flags IN (0,4) AND i.hostid IN (<batch of hostids...>)) AND ((i.name_upper LIKE 'RESTART COUNT - QUERY!_PROCESS' ESCAPE '!')) AND i.value_type IN (0,3) ORDER BY i.name LIMIT 10000

      (7.90 sec)

       

      The query now takes about four times as long in Zabbix 7.0.4 which is a very big regression.

            pzakrzewski Piotr Zakrzewski
            GRyan337 Ryan Eberly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: