-
Improvement
-
Resolution: Fixed
-
Minor
-
4.0.4
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
After updating to Moodle 4.0, we noticed slow queries on mdl_comments in the database.
These always have the same query as cause:
SELECT c.*
|
FROM mdl_comments c
|
WHERE c.commentarea = 'question' |
AND c.component = 'qbank_comment' |
AND c.itemid = '1234' |
The query came with MDL-71642 for backup of questions in core.
We have now observed the query in production for a few days and see a payload of 25% to about 60% on the database.
The cause for this behavior could be a missing index on
commentarea, component, itemid
|