-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.8.7, 2.9.1
-
Component/s: Messages, Performance
-
Labels:
-
Database:Oracle
-
Testing Instructions:
- Create lots of messages
- Execute messaging_cleanup_task on cron and look the ellapsed time
-
Workaround:
-
Difficulty:Easy
-
Affected Branches:MOODLE_28_STABLE, MOODLE_29_STABLE
-
Fixed Branches:MOODLE_28_STABLE, MOODLE_29_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-50805_master -
Pull Master Diff URL:
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