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

Inefficient SQL queries in the Dashboard

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.1
    • 1.8, 1.9.0 (alpha)
    • Frontend (F)
    • None
    • 1.8

      Here is partial debug output from the Dashboard:

      Time:0.979527 LONG SQL: SELECT DISTINCT n.nodeid, n.name as node_name, h.hostid, h.host, min(r.permission) as permission, ug.userid FROM hosts h LEFT JOIN hosts_groups hg ON hg.hostid=h.hostid LEFT JOIN groups g ON g.groupid=hg.groupid LEFT JOIN rights r ON r.id=g.groupid LEFT JOIN users_groups ug ON ug.usrgrpid=r.groupid and ug.userid=1 LEFT JOIN nodes n ON (h.hostid/100000000000000)=n.nodeid WHERE (h.hostid/100000000000000) in (0) GROUP BY h.hostid,n.nodeid,n.name,h.host,ug.userid ORDER BY n.name,n.nodeid, h.host, permission, ug.userid
      ...
      Time:0.515308 LONG SQL: SELECT g.graphid FROM graphs g, graphs_items gi, items i WHERE g.graphid=19062 AND g.graphid=gi.graphid AND i.itemid=gi.itemid AND (i.hostid NOT IN (20112,20113,20114,20115,20116,20117,20118,20119,20120,20121,20122,20123,20124,20125,20126, .......

      It seems that it still use the old inefficient logic for checking permissions. Perhaps other screens are affected as well.

            Unassigned Unassigned
            alexei Alexei Vladishev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: