-
Improvement
-
Resolution: Fixed
-
Major
-
1.9.17, 2.0.8, 2.1.5, 2.2.2
-
MySQL
-
MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-29733_master -
When a large number of students were taking a quiz yesterday, the grade_item::compute() function was being triggered on a fairly regular basis. The query to identify the grade_grades to precreate took an exceedingly long time to execute and used up our available connection pool.
The query in question joins the monolithic grade_grades table with itself in an optional (LEFT OUTER) fashion which limits the types of query optimizations available. To avoid this, instead of using DISTINCT to achieve uniqueness while also making the optional join unnecessary, I would propose using the available index to GROUP BY userid and identify within an aggregation function whether the user meets the criteria.
- Discovered while testing
-
MDL-35610 Coding error displayed when altering an assignment "Multiplicator"
-
- Closed
-
- has been marked as being related by
-
MDL-35551 Maximum execution time of 30 seconds exceeded when loading some gradebooks
-
- Closed
-
- is duplicated by
-
MDL-32554 Calculated Grade Items can cause high load in large courses
-
- Closed
-