[ZBX-2761] Long query in suggestion menu Created: 2010 Jul 26  Updated: 2017 May 30  Resolved: 2010 Jul 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 1.8.3rc1
Fix Version/s: 1.8.3

Type: Incident report Priority: Major
Reporter: Artem Suharev (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Artem Suharev (Inactive) [ 2010 Jul 26 ]

SELECT DISTINCT h.hostid,h.host
FROM hosts h,hosts_groups hg,rights r,users_groups ug
WHERE hg.hostid=h.hostid
AND r.id=hg.groupid
AND r.groupid=ug.usrgrpid
AND ug.userid=100100000000003
AND r.permission>=2
AND NOT EXISTS(
SELECT hgg.groupid
FROM hosts_groups hgg, rights rr, users_groups gg
WHERE hgg.hostid=hg.hostid
AND rr.id=hgg.groupid
AND rr.groupid=gg.usrgrpid
AND gg.userid=100100000000003
AND rr.permission<2
)
AND ((h.hostid BETWEEN 100000000000000 AND 199999999999999))
AND h.status IN (0,1)
AND h.host LIKE 'M%'
ORDER BY h.host
LIMIT 15

executes ~4s

Comment by Artem Suharev (Inactive) [ 2010 Jul 26 ]

Implemented

Generated at Sat Apr 20 13:56:54 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.