Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65403

messaging_cleanup_task should use an indexed DB field for improved performance

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.3
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      The messaging_cleanup_task process currently runs a query like this:
      DELETE FROM mdl_notifications WHERE timeread < TIMESTAMP;

      The mdl_notifications table can become quite large and the timeread field is not indexed which can lead to some very inefficient querying (several minutes on large tables instead of seconds). Please add an index to timeread to improve performance.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dakota.duff Dakota Duff
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta
              • Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: