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

Missing indexes in search_simpledb_index

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.1
    • 3.9.4, 3.10.1, 3.11, 4.1
    • Global search
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • MDL-70870_master
    • 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_search_simpledb_index;

       

      On PostgreSQL you can use

       

      1. \d mdl_search_simpledb_index;

       

      In both case, you should confirm that

      • you can see and index over the contextid field, another one over courseid field and another one over areaid field.
      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_search_simpledb_index;   On PostgreSQL you can use   \d mdl_search_simpledb_index;   In both case, you should confirm that you can see and index over the contextid field, another one over courseid field and another one over areaid field.

      We encountered slow queries with the delete of records in tables search_simpledb_index.

      Indeed, there is 3 ways to delete records :

      • by courseid
      • by context
      • by areaid

      These fields are not indexed and cause slow queries.

       

      Best regards,

        1. 0001-314689-add-indexes-to-simpleseach-db.patch
          4 kB
          Renaud Lemaire
        2. MDL-70870_fresh install test.png
          134 kB
          Angelia Dela Cruz
        3. MDL-70870_upgrade test.png
          122 kB
          Angelia Dela Cruz

            rlemaire Renaud Lemaire
            rlemaire Renaud Lemaire
            Amaia Anabitarte Amaia Anabitarte
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 37 minutes
                2h 37m

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