Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4236

Moodle Checklist module hang up the MySQL server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.19+
    • Fix Version/s: None
    • Component/s: Package: Checklist
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      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?

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: