Found a Null reference (hosts) in a query for the dashboard causing slowness due to table scans. After removing the NULL reference, the Dashboard is much faster now. :-)
Modified blocks.inc.php around line number 689
Before:
Modified blocks.inc.php around line number 689
Before:
Code:
$sql = 'SELECT DISTINCT g.groupid, g.name '.
' FROM httptest ht, applications a, [COLOR="Red"]hosts h[/COLOR], groups g, hosts_groups hg '.
' WHERE hg.hostid in ('.$available_hosts.') '.
' AND hg.hostid=a.hostid '.
' AND g.groupid=hg.groupid '.
' AND a.applicationid=ht.applicationid '.
' AND ht.status='.HTTPTEST_STATUS_ACTIVE.
' ORDER BY g.name';
Code:
$sql = 'SELECT DISTINCT g.groupid, g.name '.
' FROM httptest ht, applications a, groups g, hosts_groups hg '.
' WHERE hg.hostid in ('.$available_hosts.') '.
' AND hg.hostid=a.hostid '.
' AND g.groupid=hg.groupid '.
' AND a.applicationid=ht.applicationid '.
' AND ht.status='.HTTPTEST_STATUS_ACTIVE.
' ORDER BY g.name';
fixed.
Comment