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

Optimize upgrade_minmaxgrade course detection query to use keys

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.6, 2.9, 3.0
    • Fix Version/s: 2.8.7, 2.9.1
    • Component/s: Gradebook
    • Labels:

      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

              • Votes:
                9 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  6/Jul/15