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

Comments table in db has no indexes

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-62621-master-ixcomment
    • Easy
    • Hide

      Note

      Testing requires low level access to the database.

      Upgrade test

      1. Upgrade an existing Moodle site to a patched version.
      2. TEST: Make sure the indexes were created during the upgrade.

      Fresh install test

      1. Install a fresh new site from the patched code.
      2. TEST: Make sure the indexes were created during the installation.

      Hints

      On MySQL, you can use

      mysql> SHOW INDEX FROM mdl_comments;
      

      On PostgreSQL you can use

      # \d mdl_comments;
      

      In both case, you should confirm that

      • you can see the index over the userid field.
      • you can see the composite index over the fields contextid, commentarea, itemid (in this order).
      Show
      Note Testing requires low level access to the database. Upgrade test Upgrade an existing Moodle site to a patched version. TEST: Make sure the indexes were created during the upgrade. Fresh install test Install a fresh new site from the patched code. TEST: Make sure the indexes were created during the installation. Hints On MySQL, you can use mysql> SHOW INDEX FROM mdl_comments; On PostgreSQL you can use # \d mdl_comments; In both case, you should confirm that you can see the index over the userid field. you can see the composite index over the fields contextid, commentarea, itemid (in this order).

      causes major performance issue, especially in privacy api

      I suggest to add two indexes:
      1. contextid, commentarea, itemid
      2. userid, commentarea, component

      first index will help existing queries in comments api, second index will help queries in privacy api

            mudrd8mz David Mudrák (@mudrd8mz)
            marina Marina Glancy
            Jake Dallimore Jake Dallimore
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Ryan Wyllie Ryan Wyllie
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.