[ZBX-8719] Used query for history suboptimal and slow (up to 30 sec per item) Created: 2014 Sep 05  Updated: 2017 May 30  Resolved: 2014 Sep 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.2.4
Fix Version/s: 2.2.7rc1, 2.4.1rc1, 2.5.0

Type: Incident report Priority: Critical
Reporter: Oleg Ivanivskyi Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: performance, sql
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File explain.png     PNG File time.png    
Issue Links:
Duplicate
is duplicated by ZBX-8886 MySQL server stalls whenever disabled... Closed
is duplicated by ZBX-8731 Missing index in history_uint table s... Closed

 Description   

It appears that the used query:

select clock,ns,value from history_uint where itemid=786846 and clock<=1406552958 order by clock desc,ns desc limit 2;

This works in many times faster:

select clock,ns,value from history_uint where itemid=786846 and clock<=1406552958 order by clock desc limit 2;

Please look the screenshots for details.



 Comments   
Comment by Andris Zeila [ 2014 Sep 05 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8719

Comment by Alexander Vladishev [ 2014 Sep 09 ]

(1) Please review my changes in r48895.

wiper thanks, CLOSED

Comment by Andris Zeila [ 2014 Sep 16 ]

Released in:

  • pre-2.2.7rc1 r49036
  • pre-2.4.1rc1 r49037
  • pre-2.5.0 r49038
Generated at Fri Mar 29 07:51:54 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.