Answer the question
In order to leave comments, you need to log in
How to calibrate HP 27f monitor in WIN10-64?
New HP Desktop system unit - M01-D0050ur. Unable to calibrate HP 27f 75HZ monitor. colors are not the same.
Either I've been looking at the wrong colors all this time, or he doesn't convey the color right! Green is very bright and blue (cyan) on the contrary is dull.
Which profile to choose, which one I don’t choose, nothing changes!
Here is an example of how colors, especially green, are poisonously brightly transmitted! I don't know if you can see it or not.
Answer the question
In order to leave comments, you need to log in
Basically the GROUP BY in the query will scan the whole table in 90%. You can of course try to play around with composite indexes on the log table. Rewrite query...
The simplest way, in my opinion, in execution and works ad-hoc:
Add a field to the devices table (let's call it lastidevent ) and make an insert trigger in the eventlog table that will update the lastidevent field on the inserted id_event in the table devices. Then, in the query, connect to the log table by the lastidevent field.
Because the devices table is not loaded, then the competition will be minimal. True, you will have to reckon with the increased costs of inserting logs.
I solved the problem with two requests. First, I displayed the device id by id_place:
SELECT d.*, ev1.*
FROM devices d
INNER JOIN eventlog ev1 ON d.id_device = ev1.id_device
AND ev1.id_place IN(1,2,3) GROUP BY ev1.id_device
SELECT d.*, e.*
FROM devices d INNER JOIN eventlog e ON e.id_device = d.id_device AND e.id_device = ".$val." ORDER BY e.id_event DESC LIMIT 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question