We've got a couple of calls performed from the Grafana Zabbix plugin via Zabbix's API that are taking a long time to execute and return results:
These queries are trying to pull data for the last 6 months, but are taking many minutes to execute (making them useless for showing graphs on demand).
What can be done, if anything, to improve the speed at which these results are returned. The grafana dashboard loads a bunch of different data from a single device, and other data for shorter time ranges seems to be returned relatively quickly (as you might expect).
Code:
+--------+---------------+-----------+-------------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +--------+---------------+-----------+-------------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+ | 120069 | zabbix_web | localhost | zabbix_prod | Query | 472 | Sending data | SELECT h.* FROM history_uint h WHERE h.itemid=385160 AND h.clock>=1593525600 AND h.clock<=1611798736 | 0.000 | | 120071 | zabbix_web | localhost | zabbix_prod | Query | 472 | Sending data | SELECT h.* FROM history_uint h WHERE h.itemid=385040 AND h.clock>=1593525600 AND h.clock<=1611798736 | 0.000 |
What can be done, if anything, to improve the speed at which these results are returned. The grafana dashboard loads a bunch of different data from a single device, and other data for shorter time ranges seems to be returned relatively quickly (as you might expect).

Comment