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

Remove unnecessary index from mdl_sessions.state

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: Performance
    • Labels:
      None
    • Affected Branches:
      MOODLE_400_STABLE

      Description

      The table mdl_sessions has a column "state".

      This column is not used anywhere at the moment.

      Until it is, we should remove the column altogether, or at least remove the index created on it. This will give us a small DB performance improvement.

       

      install.xml entry:

       

      <TABLE NAME="sessions" COMMENT="Database based session storage - now recommended">
      ....
       <FIELD NAME="state" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 means normal session"/>
      ....
      <INDEX NAME="state" UNIQUE="false" FIELDS="state"/>
      

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tmuras Tomasz Muras
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: