-
Problem report
-
Resolution: Duplicate
-
Major
-
None
-
5.0.2
-
None
Steps to reproduce:
- Upgrade Zabbix to 5.0.2 version with PostgreSQL 11 and TimescaleDB extension with big history* tables
- Check latest data
Result:
- Getting heavy query and slow web response
Rootcause is SQL query
SELECT itemid FROM history WHERE itemid IN (itemid1,itemid2,itemid3,...) GROUP BY itemid HAVING MAX(clock)>$period
Query generated by getItemsHavingValuesFromSql function from CHistoryManager.php
Suggested alternative:
with cleaned as(select itemid from history where clock >$period) select distinct itemid from cleaned where itemid in((itemid1,itemid2,itemid3,...);
Rollback to 5.0.1 Frontend version have fixed the issue
Execution plan for
and
- duplicates
-
ZBX-18071 'Latest data' timeout via Monitoring > Hosts
- Closed