Add LIMIT 1 when filtering by AlarmZoneId to speed up

pull/3588/head
Isaac Connor 2022-08-30 19:34:51 +02:00
parent 6bc0ec6aab
commit 54f87aa4cf
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class FilterTerm {
switch ( $this->attr ) {
case 'AlarmedZoneId':
$value = '(SELECT * FROM Stats WHERE EventId=E.Id AND ZoneId='.$value.' AND Score > 0)';
$value = '(SELECT * FROM Stats WHERE EventId=E.Id AND ZoneId='.$value.' AND Score > 0 LIMIT 1)';
break;
case 'ExistsInFileSystem':
$value = '';