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

Add Index for timemodified in mdl_grade_grade_history table

    XMLWordPrintable

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide
      1. Upgrade your existing integration master site to the latest version and check that the grade_grades_history table has a key for the field timemodified.
      2. Create a fresh install of integration master and check the grade_grades_history table has a key for the field timemodified.
      Show
      Upgrade your existing integration master site to the latest version and check that the grade_grades_history table has a key for the field timemodified. Create a fresh install of integration master and check the grade_grades_history table has a key for the field timemodified.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31557_master

      Description

      Currently timemodified isn't indexed and could cause performance issues when the following query is run during grade_history cleanup;

      DELETE FROM mdl_grade_grades_history WHERE timemodified < 1297008812

      This could be resolved by adding the following index;

      ALTER TABLE `mdl_grade_grades_history` ADD INDEX `mdl_gradgradhist_tim_ix` (`timemodified`)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jfilip Justin Filip
              Reporter:
              kyle.armstrong Kyle Armstrong
              Peer reviewer:
              Mark Nelson
              Integrator:
              Sam Hemelryk
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/13