Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5389

Slow questionnaire query - Add index to questionnaire_quest_choice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.8.8, 2.9
    • 2.6.3, 2.8.6
    • Module: Questionnaire
    • None
    • MOODLE_26_STABLE, MOODLE_28_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE

      We found a large percentage of transaction time is spent in questionnaire/view.php and questionnaire/complete.php due to this query:

      SELECT * FROM mdl_questionnaire_quest_choice WHERE question_id = ? ORDER BY id ASC

      There is no index on question_id. We added such an index and experienced gains in performance.

      alter table mdl_questionnaire_quest_choice add index mdl_quest_choice_quesidx (question_id);

            mchurch Mike Churchward
            cfollin Chris Follin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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