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

Optimize upgrade_minmaxgrade course detection query to use keys

XMLWordPrintable

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

      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.

            dmonllao David Monllaó
            geeksmith Chris Megahan
            Dan Poltawski Dan Poltawski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            9 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.