-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
2.8.7, 3.0.2
-
MOODLE_28_STABLE, MOODLE_30_STABLE
-
MDL-52482-master -
Easy
-
2
-
International 3.9 - Sprint 3
Issue: The Moodle User Log report using Standard Log is poor performing when the course has a large number of enrolled users and lots of activity.
Example of note:
mdl_logstore_standard_log size of 30372477 records
We have noticed that when a course has thousands of enrollments and course activity that generates logs record in the upwards of 40,000 records that the Moodle User Log Report (/report/log/user.php) for that couse is taking taking minutes to generate. By comparison it only takes 2 seconds to bring a comparable report up using the Legacy Logs setting.
We found the SQL in the report that causes the issue:
SELECT * FROM mdl_logstore_standard_log WHERE courseid = '????' AND userid = '????' AND anonymous = 0 ORDER BY timecreated DESC, id DESC LIMIT 0, 100
|
In testing we applied added a temporary index and it resolved the performance issue:
create index quick_test on mdl_logstore_standard_log (courseid, userid, timecreated);
|
Possibly in relation to what was done in MDL-44998
- has a non-specific relationship to
-
MDL-69276 Poor performance resulting to page timeout on Moodle User Log report using Standard log
-
- Closed
-