[ZBX-11005] 'unlink and clear' template from hosts generates very long sql select query Created: 2016 Jul 19  Updated: 2017 May 30  Resolved: 2016 Jul 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.4.8
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: zhang Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBX-7700 Adding templates to hosts is incredib... Open

 Description   

when 'unlink and clear' template from hosts, I found lots long-running select query in DB:

# Time range: 2016-06-08 01:34:55 to 01:39:42
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 3
# Exec time 5 61783s 20454s 20683s 20594s 19861s 0 19861s
# Lock time 3 653ms 216ms 221ms 218ms 219ms 2ms 208ms
# Rows sent 0 4.95M 1.65M 1.65M 1.65M 1.65M 0 1.65M
# Rows examine 0 6.54M 2.18M 2.18M 2.18M 2.18M 0 2.18M
# Query size 7 15.82M 5.27M 5.27M 5.27M 5.27M 0 5.27M
# String:
# Databases zabbix_master
# Hosts bjzjm01-op-bs-monitor109143.bjzjm01.ksyun.co...
# Users zabbix
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+ ################################################################
# Tables
# SHOW TABLE STATUS FROM `zabbix_master` LIKE 'items_applications'\G
# SHOW CREATE TABLE `zabbix_master`.`items_applications`\G
# EXPLAIN /!50100 PARTITIONS/
SELECT t.itemappid,t.itemid,t.applicationid FROM items_applications t WHERE (t.itemid BETWEEN '744801' AND '744808' OR t.itemid BETWEEN '744817' AND '744823' OR t.itemid BETWEEN '744842' AND ...very long AND/OR list...)



 Comments   
Comment by Aleksandrs Saveljevs [ 2016 Jul 19 ]

Looks like a duplicate of ZBX-7700, closing.

Generated at Thu Apr 10 07:08:43 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.