-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
3.9.8, 3.10.5, 3.11.1
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
-
MDL-72175-master
On the big sites grade_item::regrade_final_grades can be run up to 1000 times per second during the busy exams period .
After doing a quick analysis our inf team end up with SQL that can be improved. This SQl at some point creates duplicate dead tuple rows.
UPDATE mdl_grade_grades
|
SET aggregationstatus = 'used', |
aggregationweight = $1 |
WHERE itemid = $2 AND userid = $3 |
This SQL is coming from grade_category::set_usedinaggregation
The below sql would stop postgresql creating duplicate dead tuple rows and the associated index update / wall logs if anything was slipping through.
UPDATE mdl_grade_grades
|
SET aggregationstatus = 'used', |
aggregationweight = $1 |
WHERE itemid = $2 AND userid = $3 and aggregationstatus != 'used' and aggregationweight != $1 |
- will be (partly) resolved by
-
MDL-72451 Show regrade error message in the quiz view page
- Closed