-
Problem report
-
Resolution: Cannot Reproduce
-
Blocker
-
None
-
2.4.8, 3.0.3
-
Sprint 6, Sprint 7, Sprint 8, Sprint 9, Sprint 10, Sprint 11, Sprint 12, Sprint 13, Sprint 14, Sprint 15, Sprint 16, Sprint 17, Sprint 18, Sprint 19, Sprint 20, Sprint 55 (Aug 2019)
Currently Zabbix frontend gets ALL triggers from all objects on a map and then filter out triggers, what is not efficient for the map. It causes big queries with thousands of conditions.
SQL (65.508438): SELECT f.triggerid,i.hostid FROM functions f,items i WHERE (f.triggerid BETWEEN '83931' AND '83982' OR f.triggerid BETWEEN '83995'...; SQL (64.198481): SELECT t.functionid,t.triggerid,t.itemid FROM functions t WHERE (t.triggerid BETWEEN '83931' AND '83982' OR t.triggerid BETWEEN '83995'...;
cause:
SELECT DISTINCT t.triggerid,t.status,t.value,t.priority,t.lastchange,t.description,t.expression FROM triggers t,functions f,items i WHERE (i.hostid BETWEEN '12115' AND '12127' OR i.hostid BETWEEN '12135' AND '12161' OR i.hostid BETWEEN '12168' AND '12234' OR i.hostid BETWEEN '12236' AND '12279' OR i.hostid BETWEEN '12281' AND '12298' OR i.hostid BETWEEN '12303' AND '12314' OR i.hostid BETWEEN '12316' AND '12359' OR i.hostid BETWEEN '12361' AND '12384' OR i.hostid BETWEEN '12389' AND '12393' OR i.hostid BETWEEN '12395' AND '12445' OR i.hostid BETWEEN '12447' AND '12478' OR i.hostid BETWEEN '12480' AND '12519' OR i.hostid BETWEEN '12526' AND '12573' OR i.hostid BETWEEN '12575' AND '12579' OR i.hostid BETWEEN '12583' AND '12587' OR i.hostid BETWEEN '12592' AND '12606' OR i.hostid BETWEEN '12608' AND '12614' OR i.hostid BETWEEN '12616' AND '12652' OR i.hostid BETWEEN '12654' AND '12671' OR i.hostid BETWEEN '12673' AND '12689' OR i.hostid BETWEEN '12700' AND '12715' OR i.hostid BETWEEN '12717' AND '12724' OR i.hostid BETWEEN '12729' AND '12734' OR i.hostid BETWEEN '12736' AND '12759' OR i.hostid BETWEEN '12761' AND '12765' OR i.hostid BETWEEN '12767' AND '12771' OR i.hostid BETWEEN '12773' AND '12778' OR i.hostid BETWEEN '12781' AND '12800' OR i.hostid BETWEEN '12802' AND '12844' OR i.hostid BETWEEN '12846' AND '12850' OR i.hostid BETWEEN '12852' AND '12874' OR i.hostid BETWEEN '12876' AND '12886' OR i.hostid BETWEEN '12888' AND '12915' OR i.hostid BETWEEN '12917' AND '12979' OR i.hostid BETWEEN '12981' AND '13000' OR i.hostid BETWEEN '13007' AND '13076' OR i.hostid BETWEEN '13078' AND '13083' OR i.hostid BETWEEN '13085' AND '13093' OR i.hostid BETWEEN '13095' AND '13101' OR i.hostid BETWEEN '13103' AND '13149' OR i.hostid BETWEEN '13151' AND '13162' OR i.hostid BETWEEN '13164' AND '13243' OR i.hostid BETWEEN '13245' AND '13287' OR i.hostid BETWEEN '13289' AND '13297' OR i.hostid BETWEEN '13299' AND '13351' OR i.hostid BETWEEN '13354' AND '13415' OR i.hostid BETWEEN '13417' AND '13514' OR i.hostid BETWEEN '13517' AND '13546' OR i.hostid BETWEEN '13551' AND '13555' OR i.hostid BETWEEN '13557' AND '13563' OR i.hostid BETWEEN '13565' AND '13612' OR i.hostid BETWEEN '13614' AND '13650' OR i.hostid BETWEEN '13652' AND '13715' OR i.hostid BETWEEN '13717' AND '13741' OR i.hostid BETWEEN '13746' AND '13777' OR i.hostid BETWEEN '13779' AND '13786' OR i.hostid BETWEEN '13788' AND '13820' OR i.hostid BETWEEN '13822' AND '13832' OR i.hostid BETWEEN '13834' AND '13866' OR i.hostid BETWEEN '13868' AND '13881' OR i.hostid BETWEEN '13883' AND '13966' OR i.hostid BETWEEN '13968' AND '13993' OR i.hostid BETWEEN '13995' AND '14026' OR i.hostid BETWEEN '14028' AND '14052' OR i.hostid BETWEEN '14054' AND '14071' OR i.hostid BETWEEN '14073' AND '14082' OR i.hostid BETWEEN '14084' AND '14093' OR i.hostid BETWEEN '14095' AND '14126' OR i.hostid BETWEEN '14128' AND '14137' OR i.hostid BETWEEN '14139' AND '14145' OR i.hostid BETWEEN '14147' AND '14162' OR i.hostid BETWEEN '14164' AND '14180' OR i.hostid BETWEEN '14182' AND '14191' OR i.hostid BETWEEN '14193' AND '14199' OR i.hostid BETWEEN '14201' AND '14211' OR i.hostid BETWEEN '14213' AND '14259' OR i.hostid BETWEEN '14261' AND '14349' OR i.hostid BETWEEN '14351' AND '14374' OR i.hostid BETWEEN '14377' AND '14394' OR i.hostid BETWEEN '14396' AND '14408' OR i.hostid BETWEEN '14410' AND '14476' OR i.hostid BETWEEN '14478' AND '14486' OR i.hostid BETWEEN '14488' AND '14495' OR i.hostid BETWEEN '14497' AND '14561' OR i.hostid BETWEEN '14563' AND '14570' OR i.hostid BETWEEN '14572' AND '14622' OR i.hostid BETWEEN '14624' AND '14632' OR i.hostid BETWEEN '14634' AND '14638' OR i.hostid BETWEEN '14640' AND '14690' OR i.hostid BETWEEN '14695' AND '14700' OR i.hostid BETWEEN '14709' AND '14728' OR i.hostid BETWEEN '14730' AND '14738' OR i.hostid BETWEEN '14740' AND '14780' OR i.hostid BETWEEN '14782' AND '14795' OR i.hostid BETWEEN '14797' AND '14816' OR i.hostid BETWEEN '14818' AND '14826' OR i.hostid BETWEEN '14828' AND '14850' OR i.hostid BETWEEN '14852' AND '14890' OR i.hostid BETWEEN '14892' AND '14969' OR i.hostid BETWEEN '14971' AND '15023' OR i.hostid BETWEEN '15025' AND '15066' OR i.hostid BETWEEN '15068' AND '15080' OR i.hostid BETWEEN '15082' AND '15134' OR i.hostid BETWEEN '15136' AND '15267' OR i.hostid BETWEEN '15269' AND '15333' OR i.hostid BETWEEN '15335' AND '15366' OR i.hostid BETWEEN '15368' AND '15411' OR i.hostid BETWEEN '15418' AND '15442' OR i.hostid BETWEEN '15444' AND '15456' OR i.hostid BETWEEN '15458' AND '15494' OR i.hostid BETWEEN '15498' AND '15568' OR i.hostid BETWEEN '15570' AND '15615' OR i.hostid BETWEEN '15617' AND '15621' OR i.hostid BETWEEN '15623' AND '15675' OR i.hostid BETWEEN '15677' AND '15687' OR i.hostid BETWEEN '15689' AND '15704' OR i.hostid BETWEEN '15706' AND '15724' OR i.hostid BETWEEN '15726' AND '15748' OR i.hostid BETWEEN '15750' AND '15770' OR i.hostid BETWEEN '15773' AND '15819' OR i.hostid BETWEEN '15821' AND '15855' OR i.hostid BETWEEN '15857' AND '15882' OR i.hostid BETWEEN '15884' AND '15908' OR i.hostid BETWEEN '15919' AND '15925' OR i.hostid BETWEEN '15927' AND '15982' OR i.hostid BETWEEN '15984' AND '16018' OR i.hostid BETWEEN '16020' AND '16097' OR i.hostid BETWEEN '16099' AND '16123' OR i.hostid BETWEEN '16125' AND '16145' OR i.hostid BETWEEN '16147' AND '16245' OR i.hostid BETWEEN '16247' AND '16315' OR i.hostid BETWEEN '16318' AND '16343' OR i.hostid BETWEEN '16346' AND '16384' OR i.hostid BETWEEN '16386' AND '16441' OR i.hostid BETWEEN '16443' AND '16447' OR i.hostid BETWEEN '16449' AND '16487' OR i.hostid BETWEEN '16489' AND '16493' OR i.hostid BETWEEN '16495' AND '16553' OR i.hostid BETWEEN '16555' AND '16572' OR i.hostid BETWEEN '16574' AND '16652' OR i.hostid BETWEEN '16654' AND '16684' OR i.hostid BETWEEN '16686' AND '16699' OR i.hostid BETWEEN '16701' AND '16712' OR i.hostid BETWEEN '16714' AND '16723' OR i.hostid BETWEEN '16728' AND '16766' OR i.hostid BETWEEN '16768' AND '16778' OR i.hostid BETWEEN '16780' AND '16796' OR i.hostid BETWEEN '16798' AND '16812' OR i.hostid BETWEEN '16855' AND '16879' OR i.hostid BETWEEN '16899' AND '16912' OR i.hostid BETWEEN '19046' AND '19062' OR i.hostid BETWEEN '19064' AND '19121' OR i.hostid BETWEEN '19128' AND '19132' OR i.hostid BETWEEN '19140' AND '19146' OR i.hostid BETWEEN '19165' AND '19180' OR i.hostid BETWEEN '19210' AND '19229' OR i.hostid BETWEEN '19236' AND '19249' OR i.hostid BETWEEN '19256' AND '19262' OR i.hostid BETWEEN '19267' AND '19271' OR i.hostid BETWEEN '19319' AND '19323' OR i.hostid BETWEEN '19325' AND '19330' OR i.hostid BETWEEN '19403' AND '19407' OR i.hostid BETWEEN '19442' AND '19453' OR i.hostid BETWEEN '19458' AND '19473' OR i.hostid BETWEEN '19486' AND '19496' OR i.hostid BETWEEN '19526' AND '19531' OR i.hostid IN ('12129','12130','12131','12132','12163','12164','12165','12166','12386','12387','12521','12522','12523','12524','12581','12590','12691','12692','12693','12694','12696','12697','12698','12726','12727','13002','13003','13005','13548','13549','13743','13744','14692','14693','14705','14706','14707','15413','15414','15415','15416','15496','15910','15911','15912','15914','15916','15917','16725','16726','16853','16881','16882','16888','16920','16938','16939','16940','18679','19138','19233','19234','19251','19273','19274','19276','19277','19282','19284','19285','19288','19291','19303','19304','19305','19309','19312','19313','19314','19336','19337','19349','19354','19355','19367','19368','19409','19410','19427','19428','19430','19432','19484','19501','19517','19563','19576')) AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND NOT EXISTS (SELECT NULL FROM functions f,items i,hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.hostid=h.hostid AND (i.status<>0 OR h.status<>0)) AND t.status=0 AND t.flags IN ('0','4')