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

Optimize upgrade_minmaxgrade course detection query to use keys

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.6, 2.9, 3.0
    • 2.8.7, 2.9.1
    • Gradebook

    Description

      Environment: RHEL 6
      Database: 5.5.32-MariaDB

      Testing the fix for MDL-48618 today on a copy of a large client site I identified a problematic query in the upgrade_minmaxgrade function that had been running for several hours creating a rather large tmp file. After consulting with Martin Langhoff we agreed that query joins should be written reverse of what they are currently. This will utilize the existing mdl_gradgrad_ite_ix key and greatly reduce the query time.

      After this fix the query went from never completing to completing in under 1 minute.

      Attachments

        Issue Links

          Activity

            People

              dmonllao David Monllaó
              geeksmith Chris Megahan
              Dan Poltawski Dan Poltawski
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              9 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                6/Jul/15