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

Not caching database table meta data is slowing down upgrades

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_27_STABLE

      Description

      We are upgrading a client's site from 2.6 to 2.7 and have found slowness with the quiz upgrade (5-8 hours for upgrade). After looking at MySQL's slow query log, it looks like query from mysqli_native_moodle_database->get_columns is getting run over and over again. Going back to the quiz upgrade, there is a step where quiz is iterating over all quizzes and then updating/inserting records into quiz_slots table as needed. So, this is generating a lot of calls to get_columns which isn't cached because cache is disabled.

      BONUS: Word on the street is that this same problem also slows down unit tests because MUC gets reset/purged after every test.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bushido Mark Nielsen
                Participants:
                Component watchers:
                Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: