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

Inefficient use of expensive SQL in assign_print_overview

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. You will need a course with a student and a teacher.
      2. Create an assignment with a due date in the future.
      3. Login and student and view MyMoodle page. Verify that the assignment is present below the course.
      4. As the student, submit to the assignment.
      5. Login as teacher, verify that the assignment, is present below the course (the format may be different in each branch).
      Show
      You will need a course with a student and a teacher. Create an assignment with a due date in the future. Login and student and view MyMoodle page. Verify that the assignment is present below the course. As the student, submit to the assignment. Login as teacher, verify that the assignment, is present below the course (the format may be different in each branch).
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35127-master

      Description

      After updating to a version for 2.3.x, we began seeing large DB loads from two SQL queries in assign_print_overview.

      The intent of the queries is to cache data for use in the following loop, saving load, but the queries are used for every page view, even when they are not needed.

      One in particular is used only for people with the mod/assign:grade permission, which in most instances is a fraction of the userbase.

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/13