Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
561 views
in Plugins by
closed by

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

 

Q2A version: 1.7.2
closed with the note: done
by
Update: I just saw that another load of the page resulted in 0.2 ms. I guess that was just a one time runaway...
...