mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
This query was performing badly. The solution seems to be to add a redundant JOIN and WHERE to the subquery. I renamed the table aliases in the subquery to avoid name collisions elsewhere. I am afraid that makes the diff rather unhelpful. The AND subq_qu.component = :qubacomponent2 line is new. The other lines have just had subq_ added.