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

Index needed on event table (uuid, subscriptionid)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5
    • 3.2.3, 3.3
    • Calendar
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_35_STABLE
    • MDL-59438-master
    • Hide
      1. Connect to the DB server using your preferred SQL client and run the following query on your Moodle DB (use your own DB prefix instead of mdl_):

        SHOW INDEX FROM mdl_event;
        

      2. Confirm that you see an index for the subscriptionid field and also an index for the uuid field.
      Show
      Connect to the DB server using your preferred SQL client and run the following query on your Moodle DB (use your own DB prefix instead of mdl_): SHOW INDEX FROM mdl_event; Confirm that you see an index for the subscriptionid field and also an index for the uuid field.

      We're seeing a slow query in our MySQL monitoring which is due to it having to do a full table scan rather than using an index. It's in calendar_add_icalendar_event():

      $DB->get_record('event', array('uuid' => $eventrecord->uuid,
              'subscriptionid' => $eventrecord->subscriptionid)
      

      It would be useful if there was an index this query could use.

            rezaie9 Shamim Rezaie
            maherne Michael Aherne
            Simey Lameze Simey Lameze
            Damyon Wiese Damyon Wiese
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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