While debugging I came across this query:
SELECT qa_achievements.user_id AS uid,qa_achievements.oldest_consec_visit AS ocv,qa_achievements.longest_consec_visit AS lcv,qa_achievements.total_days_visited AS tdv,qa_achievements.last_visit AS lv,qa_achievements.first_visit AS fv, qa_userpoints.points as points FROM qa_achievements, qa_userpoints WHERE qa_achievements.user_id=1 AND qa_userpoints.userid=1
216.49 ms - 1 row - 7 columns
which is extremely much time taking.
Does anyone have a clue how to improve this query?
It originates from qa-badge-layer.php, see https://github.com/NoahY/q2a-badges/blob/master/qa-badge-layer.php#L48