Add LIMIT 1 when filtering by AlarmZoneId to speed up
parent
6bc0ec6aab
commit
54f87aa4cf
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in New Issue