-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
4.4.5
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 ......