Slow graph dropdowns in "Monitoring" => "Graphs"

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Major
    • None
    • Affects Version/s: 1.8.14
    • Environment:

      The dropdown menus in "Monitoring" => "Graphs" were pretty slow.

      I executed "show full processlist" while the menu loads an got the following statement:

      SELECT  DISTINCT  g.* FROM groups g,hosts_groups hg,hosts h WHERE ((g.groupid  BETWEEN 100000000000000 AND 199999999999999) OR (g.groupid  BETWEEN 200000000000000 AND 299999999999999)) AND hg.groupid=g.groupid AND h.hostid=hg.hostid AND h.status=0 AND EXISTS( SELECT DISTINCT i.itemid  FROM items i, graphs_items gi  WHERE i.hostid=hg.hostid  AND i.itemid=gi.itemid);
      

      I added a index:

      CREATE INDEX graphs_items_1 ON graphs_items(itemid) USING btree; 
      

      After creating a index execution time was reduced from 5 seconds to 0.03 seconds.

      This problem is also described in the following closed bug https://support.zabbix.com/browse/ZBX-569.

            Assignee:
            Unassigned
            Reporter:
            Marc Schoechlin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: