CRM-20313 Add index to civicrm_activity.status_id

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.17
    • Fix Version/s: 4.7.19
    • Component/s: Core CiviCRM
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Adding an index to this Activity column speeds up reports and searching dramatically in large databases where status is used as a filter.

      ALTER TABLE `civicrm_activity` ADD INDEX (`status_id`);

        Attachments

          Activity

          [CRM-20313] Add index to civicrm_activity.status_id
          Stoob added a comment -

          Eileen McNaughton and Aidan Saunders say this is related to CRM-20312

          Joe Murray added a comment -

          Heh Stoob, could you review the PRs? They should have been a single one.

          Stoob added a comment - - edited

          Hi Joe Murray sorry I don't feel qualified to review/approve. I've never seen those XML files before and am unfamiliar with the "UI" in the

          ALTER TABLE `civicrm_activity` ADD INDEX UI_status_id (`status_id`);

          Joe Murray added a comment -

          I'm listening and looking and agree with others that we should be calling a fn to add the index. Needs a rewrite.

          Seamus Lee added a comment -

          PR has been merged. Index has been added for new installs and there is a new way of managing Indexes on upgrade

            People

            • Assignee:
              Monish Deb
              Reporter:
              Stoob

              Dates

              • Created:
                Updated:
                Resolved: