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

slow select SQL query on Monitoring -> Dashboard

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.0rc4
    • 1.8.12rc1
    • Frontend (F)
    • None

      There is a slow query on Monitoring -> Dashboard

      Time:13.607584 LONG SQL: SELECT COUNT(DISTINCT t.triggerid) as cnt FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status=0 AND i.hostid=h.hostid AND h.status=0
      Time:7.479625 LONG SQL: SELECT COUNT(DISTINCT t.triggerid) as cnt FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status=0 AND i.hostid=h.hostid AND h.status=0 AND t.status=0
      Time:1.071415 LONG SQL: SELECT COUNT(DISTINCT t.triggerid) as cnt FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status=0 AND i.hostid=h.hostid AND h.status=0 AND t.status=1
      Time:4.856498 LONG SQL: SELECT COUNT(DISTINCT t.triggerid) as cnt FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status=0 AND i.hostid=h.hostid AND h.status=0 AND t.status=0 AND t.value=0
      Time:4.508996 LONG SQL: SELECT COUNT(DISTINCT t.triggerid) as cnt FROM triggers t, functions f, items i, hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.status=0 AND i.hostid=h.hostid AND h.status=0 AND t.status=0 AND t.value=2
      Time:2.020471 LONG SQL: SELECT COUNT(DISTINCT i.itemid) as cnt FROM items i, hosts h WHERE i.hostid=h.hostid AND h.status=0
      Time:4.234738 LONG SQL: SELECT COUNT(DISTINCT i.itemid) as cnt FROM items i, hosts h WHERE i.hostid=h.hostid AND h.status=0 AND i.status=0
      Time:3.350426 LONG SQL: SELECT sum(1.0/i.delay) as qps FROM items i,hosts h WHERE i.status=0 AND i.hostid=h.hostid AND h.status=0 AND i.delay<>0

            Unassigned Unassigned
            kodai Kodai Terashima
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: