-
Type:
Problem report
-
Resolution: Fixed
-
Priority:
Trivial
-
Affects Version/s: 7.0.17, 7.4.1, 8.0.0alpha1
-
Component/s: Server (S)
-
S25-W38/39, S25-W40/41, S25-W46/47, S25-W48/49, S25-W50/51/52/01
-
1
Zabbix server, Zabbix proxy and frontend can generate such queries in some places where select in batches is not performed:
SELECT * FROM table WHERE id IN (1, 2, ..., 1000) OR id IN (1001, 1002, ..., 2000)
However especially on PostgreSQL they are known to work extremely slow, recent example:
ZBX-26732
They should be simplified so that database engine can analyze them easier and perform fast and efficiently:
SELECT * FROM table WHERE id IN (1, 2, ..., 1000,1001, 1002, ..., 2000)
MySQL can also optimize queries with or conditions into single in but there is not reason to put strain on MySQL to do this work and it's much faster with single in statement. SQLite3 can work old way with or if needed.
Also please see ZBX-24435
- caused by
-
ZBX-6744 "expression tree is too large (maximum depth 1000)" error logged to zabbix_proxy log. configuration is not updated
-
- Closed
-
- related to
-
ZBX-24435 Slow query in latest data when more than 950 items selected
-
- Ready for QA
-
-
ZBX-27297 Proxy configuration sync blocked by deadlocks in item_rtdata after proxy failover/detach (proxy group)
-
- Closed
-
-
ZBX-26781 SELECT triggers queries are the cause for much blocking and wait time, in some cases for several hours. Looking for ways to refactor the query to Zabbix Frontend
-
- READY TO DEVELOP
-