-
Improvement
-
Resolution: Fixed
-
Minor
-
2.8.7, 2.9.1
-
Oracle
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-50805_master -
-
Easy
-
- Create lots of messages
- Execute messaging_cleanup_task on cron and look the ellapsed time
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