-
Incident report
-
Resolution: Unresolved
-
Trivial
-
None
-
2.2.14, 3.0.13
-
Sprint 23
Notifications page SQL performance improved. ( ZBX-8924, The number of times that slow queries has decreased. (7 to 5) )
But still got performance problems with these SQL queries.
SQL Info :
2.2.13 -
SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='0' AND e.object='0') AND a.clock>'1451228400' AND a.clock<'1473060439' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='1') AND a.clock>'1451228400' AND a.clock<'1473060439' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='2') AND a.clock>'1451228400' AND a.clock<'1473060439' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='2' AND e.object='3') AND a.clock>'1451228400' AND a.clock<'1473060439' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='0') AND a.clock>'1451228400' AND a.clock<'1473060439' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='4') AND a.clock>'1451228400' AND a.clock<'1473060439' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='5') AND a.clock>'1451228400' AND a.clock<'1473060439'
2.2.14 (fixed by ZBX-8924)
SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM actions aa WHERE a.actionid=aa.actionid AND aa.eventsource='0') AND a.clock>'1451228400' AND a.clock<'1473063352' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='1') AND a.clock>'1451228400' AND a.clock<'1473063352' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='1' AND e.object='2') AND a.clock>'1451228400' AND a.clock<'1473063352' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM actions aa WHERE a.actionid=aa.actionid AND aa.eventsource='2') AND a.clock>'1451228400' AND a.clock<'1473063352' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='0') AND a.clock>'1451228400' AND a.clock<'1473063352' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='4') AND a.clock>'1451228400' AND a.clock<'1473063352' SELECT a.alertid,a.mediatypeid,a.userid,a.clock FROM alerts a WHERE EXISTS (SELECT NULL FROM events e WHERE a.eventid=e.eventid AND e.source='3' AND e.object='5') AND a.clock>'1451228400' AND a.clock<'1473063352'