summaryrefslogtreecommitdiffstats
path: root/frontends/php/events.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-03-28 13:31:08 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-03-28 13:31:08 +0000
commit802fd948e5904e44210436c73d6ea5cc096db00a (patch)
tree12da31511d762fcbd19125088531601a2fe5d432 /frontends/php/events.php
parent3c22992c59c0c454511c6525df5b37abeb8a53fd (diff)
downloadzabbix-802fd948e5904e44210436c73d6ea5cc096db00a.tar.gz
zabbix-802fd948e5904e44210436c73d6ea5cc096db00a.tar.xz
zabbix-802fd948e5904e44210436c73d6ea5cc096db00a.zip
- SQL speed improvement 2 [0.02 - 0.39] (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2716 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/events.php')
-rw-r--r--frontends/php/events.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/php/events.php b/frontends/php/events.php
index 87126546..8dd4cfae 100644
--- a/frontends/php/events.php
+++ b/frontends/php/events.php
@@ -136,11 +136,11 @@
if(isset($_REQUEST["hostid"]))
{
- $sql="select distinct a.clock,a.value,t.triggerid from alarms a,triggers t,hosts h,items i,functions f where t.triggerid=a.triggerid and f.triggerid=t.triggerid and f.itemid=i.itemid and i.hostid=h.hostid and h.hostid=".$_REQUEST["hostid"]." order by clock desc limit ".(10*($_REQUEST["start"]+100));
+ $sql="select distinct a.clock,a.value,a.triggerid from alarms a,functions f,items i where a.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=".$_REQUEST["hostid"]." order by clock desc limit ".(10*($_REQUEST["start"]+100));
}
else
{
- $sql="select distinct a.clock,a.value,t.triggerid from alarms a,triggers t,hosts h,items i,functions f where t.triggerid=a.triggerid and f.triggerid=t.triggerid and f.itemid=i.itemid and i.hostid=h.hostid order by clock desc limit ".(10*($_REQUEST["start"]+100));
+ $sql="select distinct triggerid,clock,value from alarms order by clock desc limit ".(10*($_REQUEST["start"]+100));
}
$result=DBselect($sql);