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

Redundant indexes in Moodle 2.7

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7, 2.8.1
    • Fix Version/s: None
    • Labels:
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE

      Description

      I have run percona script pt-duplicate-key-checker on moodle 2.7 database and many tables have redundant indexes.
      For example table mdl_user_enrolments have the keys
      `mdl_userenro_enr_ix` (`enrolid`) and
      `mdl_userenro_enruse_uix` (`enrolid`,`userid`).

      The key mdl_userenro_enr_ix is redundant because it is the left-prefix of index `mdl_userenro_enruse_uix.

      Duplicate indexes like this can hurt performance, but sometimes the redundant index makes sense when the full index is a lot longer.

      The redundant keys need to be reviewed to see if some of them can be deleted to improve moodle performance.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mirihef Miri Hefetz
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: