[ZBX-20544] Slow LLD of triggers Created: 2022 Feb 07  Updated: 2024 Apr 10  Resolved: 2022 Feb 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 6.0.0rc2
Fix Version/s: 6.0.1rc1, 6.2.0alpha1, 6.2 (plan)

Type: Problem report Priority: Major
Reporter: Vladislavs Sokurenko Assignee: Michael Veksler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File item_and_triggers_discovery.xml    
Issue Links:
Causes
caused by ZBXNEXT-6196 Zabbix is limited on oracle to store ... Closed
Duplicate
is duplicated by ZBX-20582 Typo in lld_trigger.c Closed
Team: Team B
Sprint: Sprint 85 (Feb 2022)
Story Points: 0.5

 Description   

Following query is greatly slower after 0e36dceb985

Unknown how long but already 13 minutes and one time waited for an hour and still no success.

| 468 | zabbix          | localhost:55348 | zabbix | Query   |  795 | executing              | select t.triggerid,t.description,t.expression,t.recovery_expression from triggers t where t.triggeri |
 

Tried the same on 5.0 and it was 1~ second

 44630:20220207:112253.470 slow query: 1.683397 sec, "select distinct t.triggerid,t.description,t.expression,t.recovery_expression from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=10084 and (t.description in 

Expected:
ZBXNEXT-6196 mentions oracle so MySQL performance shouldn't have been affected

Actual:
MySQL performance have degraded greatly.

Steps:
Create empty database and try to discover lots of triggers for one discovery rule



 Comments   
Comment by Vladislavs Sokurenko [ 2022 Feb 17 ]

Fixed in:

Generated at Fri Apr 04 18:56:24 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.