Ad Widget

Collapse

Zabbix 1.5 - DB Deadlocks from screens.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5 - DB Deadlocks from screens.php

    Found that tables scans were occurring due to NULL table references in screens.php. graph_items (gi) is in several queries in the FROM clause but never used which causes huge table scans and deadlocks.

    Note: This can be found 3 times in the screens files. After I removed graph_items from the query my response time is a lot quicker.
    For example:
    Code:
        $result=DBselect('SELECT DISTINCT g.groupid, g.name '.
                                            ' FROM groups g, hosts_groups hg, hosts h, items i, [COLOR="Red"]graphs_items gi [/COLOR]'.
                                            ' WHERE g.groupid in ('.$availiable_groups.') '.
                                                    ' AND hg.groupid=g.groupid '.
                                                    ' AND h.status='.HOST_STATUS_MONITORED.
                                                    ' AND h.hostid=i.hostid '.
                                                    ' AND hg.hostid=h.hostid '.
                                            ' ORDER BY g.name');
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Thanks fixed.
    Zabbix | ex GUI developer

    Comment

    Working...