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

Inefficient cron job query related to gradehistorylifetime setting on the cleanup page (mdl_grade_grades_history)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6
    • Fix Version/s: None
    • Component/s: Gradebook, Performance
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      See more details in the forum discussion http://moodle.org/mod/forum/discuss.php?d=138337

      Basically by default, Moodle 1.9.x will set up a cron job that would run this following query every 15 minutes to clean out the "grade history" table. This doesn't cause any site slow or serious bump in CPU but it's still not a efficient query and things could get worse (query > 2 - 3 seconds) when the table gets really big. According to Tim, this query is related to the gradehistorylifetime setting on the cleanup page. I'm filing a bug report here and I should be able to come up with a patch shortly. Stay tuned.

        Attachments

          Activity

            People

            • Assignee:
              moodle.com moodle.com
              Reporter:
              chuang Wen Hao Chuang
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: