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

Not caching database table meta data is slowing down upgrades

    XMLWordPrintable

Details

    • 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

              Unassigned Unassigned
              bushido Mark Nielsen
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Sabina Abellan, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: