Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.5
-
Component/s: Backup, Performance
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_25_STABLE
-
Fixed Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
-
Epic Link:
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
Inside restore_dbops::prechek_precheck_qbanks_by_level, get_record is called in a loop for all questions in a particular category. This can result in thousands of DB calls for a single category when it should be completed as a single call.
In a large database, the largest set of questions seen is 9k for any particular category. The memory use of the cache is for the single function and an inline memory hash with a single SQL will resolve the database overhead here.