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

              Assignee:
              pferre22 Pau Ferrer
              Reporter:
              pferre22 Pau Ferrer
              Peer reviewer:
              Simey Lameze
              Integrator:
              Andrew Nicols
              Tester:
              Frédéric Massart
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

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