[ZBX-12066] Timeline slider initialization slow SQL queries. Created: 2017 Apr 11  Updated: 2018 Sep 11  Resolved: 2018 May 23

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

Type: Incident report Priority: Blocker
Reporter: Marc Assignee: Unassigned
Resolution: Won't fix Votes: 2
Labels: performance, timeline, timeperiodselection, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File MaxBackPeriod.png     Text File Zbx12066-zbx_max_back.patch     Text File Zbx12066.patch     File zbx-12066.sql    
Issue Links:
Duplicate
is duplicated by ZBX-12104 Slow query in items.inc.php/item_get_... Closed
Sub-task
part of ZBXNEXT-4361 A new redesigned time selector (Z4rc1) Closed
Sprint: Sprint 5, Sprint 6

 Description   

Today we identified a serious performance issue caused by the timeline slider resp. its need to find out the lowest time stamp:

******************** Script profiler ********************
Total time: 93.772462
Total SQL time: 93.650582
SQL count: 41 (selects: 27 | executes: 14)
Peak memory usage: 6.75M
Memory limit: 1G

--- SNIP --- SNAP --- SNIP --- SNAP ---

SQL (92.13814): SELECT MIN(ht.c) AS min_clock FROM (SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839162' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839198' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839121' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839103' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839073' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839132' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882105' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839144' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839109' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839096' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839043' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882098' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839174' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839186' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='836308' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839193' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839078' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839169' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839049' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882093' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='836307' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839055' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839127' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839145' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839211' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839072' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839163' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882104' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839175' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882131' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839054' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882113' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839066' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839115' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882119' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839157' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839060' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839042' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839204' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839151' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839199' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839126' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839180' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882118' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839156' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839067' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882137' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839192' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882130' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839133' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882112' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882099' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839187' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882124' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839181' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882092' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839079' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839210' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839120' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839138' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839097' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839139' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839061' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882136' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839085' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='882125' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839205' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839048' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839108' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839150' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839114' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839102' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839168' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='839084') ht

--- SNIP --- SNAP --- SNIP --- SNAP ---

Admittedly this is an extreme example of a Custom graph with more then 70 Items and a total size of over 316 GB for trends tables.
However spending one and a half minute on preparing the time slider and just the fraction of a second on querying/processing the actual graph data seems a bit disproportionate to me

We briefly discussed this in the office and didn't came up with a satisfying alternative method of initializing the timeline slider nor the zoom links.
Then our Zabbix admin asked: Does anybody of you actually make use of that thing?
The answer was surprisingly simply: No!

Nobody on-site seems to make, or ever had made, use of it. The Zooming and shifting, as well as the date picker is used frequently - but never the slider itself.

So, how about getting rid of it and using the gained space for visually more appealing resp. user-friendly zoom and shift buttons?

PS: An even more rigorous proposal was to get even rid of the zoom pre-sets and replacing them by a simple zoom-out function. But the guy who throws that in is a bit "Grafana affected"



 Comments   
Comment by Marc [ 2017 Apr 11 ]

For the record, this issue is primarily not about removing the timeline slider. The main point is the excessive load it causes.
The matter of fact that this slider seems practically useless for every user we asked on-site so far remains though.

Comment by Alexei Vladishev [ 2017 Apr 12 ]

I am sure there is ZBX report about this issue already. The issue is so annoying for some setups that it needs to be fixed asap. Raising priority and it goes straight to dev team!

Comment by Volker Fröhlich [ 2017 Apr 12 ]

And here is something else for the record:

https://github.com/grafana/grafana/issues/300

Comment by Marc [ 2017 Apr 13 ]

Yet another idea of graph control: Panning and zooming via dragging and scrolling.

This has been implemented for the timeSeries widget of the zabbix-d3js-widgets project.

It takes just a few seconds to test it:

  1. Download ZIB.
  2. Unpack ZIP.
  3. Open zabbix-d3js-widgets-master/samples.html (in your Broswer).
  4. Drag'n'Scroll on one of the timeSeries widgets.

The widgets will show data coming from the Zabbix demo installation on zabbix.org.

PS: This kind of control makes likely only sense with local (Browser) rendered graphs.

PPS: Use Chrome for the best user experience

Comment by Gregory Chalenko [ 2017 Apr 18 ]

Fixed in:

Comment by Marc [ 2017 Apr 18 ]

Don't forget about httpdetails.php

gcalenko RESOLVED r67386 thanks for pointing this out

Comment by Marc [ 2017 Apr 18 ]

How about having two limiting factors? an ZBX_MAX_PERIOD as used before and a new ZBX_MAX_BACK for this particular issue?
It would be nice, if one could keep (and access) many years of trends data, without also allowing the slider to select the same extend for visualization.

Duh, although it still somehow feels like hacking around the actual issue...

Comment by Gregory Chalenko [ 2017 Apr 19 ]

There are already two constants ZBX_MIN_PERIOD and ZBX_MAX_PERIOD for defining allowed time line period. When time period is defined there should not be SQL query problems.

Comment by Marc [ 2017 Apr 19 ]

ZBX_MIN_PERIOD as well as ZBX_MAX_PERIOD are the limiting factors of the time slider bar - the selectable period. Thus it seems wrong to me to miss-use MAX_PERIOD for this issue here.

By doing so, one is not able to go further back in time, without potentially causing performance issues by allowing at the same time too high time slider periods.

Comment by Marc [ 2017 Apr 19 ]

Increasing ZBX_MAX_PERIOD would worsen ZBXNEXT-1984 even more.

Comment by Gregory Chalenko [ 2017 Apr 19 ]

Can you please provide:

  • your sql server version details
  • database schema
Comment by Marc [ 2017 Apr 19 ]

Run time of attached zbx-12066.sql SQL query:

 min_clock
------------
 1444039200
(1 row)

Time: 11372.103 ms

Edit:
Just for the sake of comparability, here the original query again:

 min_clock
------------
 1439276400
(1 row)

Time: 94266.332 ms

PS: While the modified SQL query is significant faster, it's still not fast enough in my opinion for just preparing a control/navigation object.

PPS: Note the different results!

Comment by Marc [ 2017 Apr 19 ]

how about this one?

zabbix=# SELECT MIN(clock) AS min_clock FROM trends_uint where itemid in (839162, 839198, 839121, 839103, 839073, 839132, 882105, 839144, 839109, 839096, 839043, 882098, 839174, 839186, 836308, 839193, 839078, 839169, 839049, 882093, 836307, 839055, 839127, 839145, 839211, 839072, 839163, 882104, 839175, 882131, 839054, 882113, 839066, 839115, 882119, 839157, 839060, 839042, 839204, 839151, 839199, 839126, 839180, 882118, 839156, 839067, 882137, 839192, 882130, 839133, 882112, 882099, 839187, 882124, 839181, 882092, 839079, 839210, 839120, 839138, 839097, 839139, 839061, 882136, 839085, 882125, 839205, 839048, 839108, 839150, 839114, 839102, 839168, 839084) ;
 min_clock
------------
 1439276400
(1 row)

Time: 180.584 ms
zabbix=#
Comment by Marc [ 2017 Apr 19 ]

Just applied Zbx12066.patch in production and will test it a while.

Comment by Marc [ 2017 Apr 19 ]

No further testing needed. If relevant index portions are not cached, then it (of course) still takes too long:

SQL (23.187104): SELECT MIN(clock) AS min_clock FROM trends WHERE itemid in (128386,128391,128390,128384,128387,128385,128383,128389)

Another option work-around could be asynchronous loading (affected parts?) of the time-slider.

Comment by Alexei Vladishev [ 2017 Apr 20 ]

Mark, efficiency of calculation of the minimum relies heavily on backend storage engine. Even for MySQL it can be extremely slow in case of multiple partitions. Also, the calculation will depend very much on number of items, which I'd like to avoid.

The feature is about making graphs, dashboard and screens a pleasant experience. I'm afraid we won't be able to achieve it if Zabbix is forced to make this calculation, which is also very unfriendly to caching since we are looking for the oldest data.

Comment by Marc [ 2017 Apr 20 ]

Absolutely. I cannot think of a decent way for a general solution - except of eliminating the need of such queries in such crucial places.

So, possibly it's best to revert to the origin issue description and move it back to ZBXNEXT

Comment by Marc [ 2017 Apr 20 ]

Attached patch Zbx12066-zbx_max_back.patch implements the mentioned approach with a dedicated ZBX_MAX_BACK constant. It defines the maximum period back in time where the slider can be moved to resp. data can be selected for visualization.

Comment by Gregory Chalenko [ 2017 Apr 21 ]

SQL queries for timeline slider initialization are slow in specific environment. In this case it was partitioned Postgres database. Solution using constant values for time period will be not implemented.

Comment by Marc [ 2017 Apr 25 ]

For the record, partitioning is irrelevant here. The cause for slowing down was "many queries with many full index scans" vs " few queries with few full index scans". Where I consider the latter still not fast enough for initialization of a single control/navigation object.

Comment by Oleg Egorov (Inactive) [ 2017 Apr 28 ]

Cannot reproduce this issue
CLOSED

Comment by Marc [ 2017 Apr 29 ]

oleg.egorov, what was your test scenario and can you be so kind and share the execution plan of your test?

Comment by Marc [ 2017 May 03 ]

Here yet another example on a much smaller Zabbix 2.4 instance backed by MySQL:

******************** Script profiler ********************
Total time: 13.81208
Total SQL time: 13.731614
SQL count: 61 (selects: 48 | executes: 13)
Peak memory usage: 12.75M
Memory limit: 128M

--- SNIP --- SNAP --- SNIP ----

SQL (3.059654): SELECT MIN(ht.c) AS min_clock FROM (SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49271' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49272' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49273' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49274' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49275' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49276' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49277' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49278' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49279' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49280' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49281' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49282' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49292' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49293' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49294' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49283' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49284' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49285' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49301' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49302' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49303' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49304' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49305' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49306' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49286' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49287' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49288') ht
httpdetails.php:281 → get_min_itemclock_by_itemid() → DBselect() in /usr/share/zabbix/include/graphs.inc.php:269

SQL (8.660856): SELECT MIN(ht.c) AS min_clock FROM (SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49271' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49272' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49273' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49274' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49275' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49276' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49277' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49278' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49279' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49280' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49281' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49282' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49292' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49293' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49294' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49283' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49284' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49285' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49301' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49302' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49303' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49304' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49305' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49306' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49286' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49287' UNION ALL SELECT MIN(ht.clock) AS c FROM trends ht WHERE ht.itemid='49288' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49271' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49272' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49273' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49274' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49275' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49276' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49277' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49278' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49279' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49280' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49281' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49282' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49292' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49293' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49294' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49283' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49284' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49285' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49301' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49302' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49303' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49304' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49305' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49306' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49286' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49287' UNION ALL SELECT MIN(ht.clock) AS c FROM trends_uint ht WHERE ht.itemid='49288') ht
httpdetails.php:281 → get_min_itemclock_by_itemid() → DBselect() in /usr/share/zabbix/include/graphs.inc.php:269

--- SNIP --- SNAP --- SNIP ----

Edit: Version information of the respective MySQL DBMS:

SHOW VARIABLES LIKE '%vers%';
# Variable_name, Value 
'innodb_version', '5.6.24' 
'protocol_version', '10' 
'slave_type_conversions', '' 
'version', '5.6.24-log' 
'version_comment', 'MySQL Community Server (GPL)' 
'version_compile_machine', 'x86_64' 
'version_compile_os', 'Linux'
Comment by Alexander Vladishev [ 2017 May 09 ]

Related issue: ZBX-3228

Comment by Alexander Vladishev [ 2018 May 23 ]

Will be fixed after implementation of the new time selector in ZBXNEXT-4361 in version 4.0.0.

Comment by Marc [ 2018 May 23 ]

Does it mean it will be implicitly fixed by implementation of ZBXNEXT-4361?

Comment by Alexander Vladishev [ 2018 May 24 ]

Yes. This SQL statement was removed in ZBXNEXT-4361.

Comment by Marc [ 2018 May 24 ]

All right. Thanks for clarifying!

Generated at Thu Mar 28 11:11:34 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.