[ZBX-17327] Action pages with triggers source can be slow Created: 2020 Feb 17  Updated: 2020 Feb 17

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 4.4.5
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Elina Kuzyutkina (Inactive) Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: action, frontend,api, macro
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File profiler_debug.txt.7z    
Issue Links:
Duplicate

 Description   

We resolve {ITEM.VALUE*} and {ITEM.LASTVALUE} macro to view Action page (with Trigger source)
This data is not displayed anywhere on this page, but queries can be slow and create additional load on the database
For example:

Total time: 51.125785
Total SQL time: 50.903722
.....
SQL (5.802226): SELECT MAX(h.clock) FROM history h WHERE h.itemid='xxxx' AND h.clock>1581837778
actionconf.php:856 ? CView->render() ? include() ? actionConditionValueToString() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CTrigger->get() ? CMacrosResolverHelper::resolveTriggerNames() ? CMacrosResolver->resolveTriggerNames() ? CMacrosResolverGeneral->getItemMacros() ? CHistoryManager->getLastValues() ? CHistoryManager->getLastValuesFromSql() ? DBselect() in include/classes/api/managers/CHistoryManager.php:155
......

Generated at Mon Mar 17 08:22:22 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.