Hi!
Please note that I don’t have a real problem, everything works fine. I just turned on “log-queries-not-using-indexes” in mysql today and noticed that the following query is filling the logfile quite fast. (I snipped some columns for readability.) The queries are really fast, so there are no performance problems either, I am just curious: Is there an index missing or is it maybe just the order by clause?
( SELECT [snipped columns], 0 as priority
FROM piwik_log_visit
WHERE visit_last_action_time >= '2012-12-20 18:35:40' AND idsite = '1' AND config_id = '^OÄ^B»f¡Ê<8e>'
ORDER BY visit_last_action_time DESC
LIMIT 1
)
UNION
( SELECT [snipped columns], 1 as priority
FROM piwik_log_visit
WHERE visit_last_action_time >= '2012-12-20 18:35:40' AND idsite = '1' AND idvisitor = '^<88>gg|ºò½'
LIMIT 1
)
ORDER BY priority DESC
LIMIT 1;