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

Cron Messaging Cleanup Task very slow due to lack of field indexing

    XMLWordPrintable

    Details

      Description

      I'm using oracle but maybe this affects other servers...

      The cleanup takes more than 9 seconds executing the next query:
      $DB->delete_records_select('message_read', 'notification=1 AND timeread<:notificationdeletetime', $params);

      After some testing we've decided to create a non unique index on notification field and the task now is 0.3 seconds! :-D

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Nov/15