ZBXNEXT-3588 code has been prepared for bulk select on multiple events per condition and many places are implemented.
This task focuses on bulk select for trigger id.
Currently for each event zabbix server will resolve hierarchy of template ids.
Furthermore each event will be checked against condition. This means events * levels of templates * conditions. While it can be level of templates * conditions with bulk selects.
So for 1000 events with 3 levels and 1000 conditions it is now 3000000 select queries
After optimization should be 3000