mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 22:25:04 +02:00
MDL-54797 course: Add indexed field to condition of delete query
Deleting records from the course_completion_criteria table goes much faster when we include the indexed course field in the delete query.
This commit is contained in:
parent
6a74e76fb8
commit
e9f7c4a4b2
@ -1772,6 +1772,7 @@ function course_delete_module($cmid) {
|
||||
// very quick on an empty table).
|
||||
$DB->delete_records('course_modules_completion', array('coursemoduleid' => $cm->id));
|
||||
$DB->delete_records('course_completion_criteria', array('moduleinstance' => $cm->id,
|
||||
'course' => $cm->course,
|
||||
'criteriatype' => COMPLETION_CRITERIA_TYPE_ACTIVITY));
|
||||
|
||||
// Delete all tag instances associated with the instance of this module.
|
||||
|
Loading…
x
Reference in New Issue
Block a user