-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
1.9.19+
-
None
-
MOODLE_19_STABLE
We got a issue with the Checklist module for Moodle 1.9 when we have very large number of students (69163 students).
We had deeper look on the issue and regconize that it come from a SQL query in function checklist_get_participants in checklist\lib.php
$sql = "SELECT DISTINCT u.id, u.id FROM {$CFG->prefix}user u, {$CFG->prefix}checklist_item i, {$CFG->prefix}checklist_check c ";
$sql .= "WHERE i.checklist = '$checklistid' AND ((c.item = i.id AND c.userid = u.id) OR (i.userid = u.id))";
This happens when we have very large number rows of user, checklist_item and
checklist_check ( eg. we have user: 69163 rows, checklist_item: 2793, checklist_check: 20898)
Is someone have a better query optimize this?