Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40584

get_record called in a loop in restore_dbops::prechek_precheck_qbanks_by_level

    XMLWordPrintable

    Details

      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.

        Attachments

          Activity

            People

            Assignee:
            mr-russ Russell Smith
            Reporter:
            mr-russ Russell Smith
            Peer reviewer:
            Tim Hunt
            Integrator:
            Dan Poltawski
            Tester:
            Marina Glancy
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Sep/13