Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335556 )

Change subject: Add index to activity_date_time column.
......................................................................

Add index to activity_date_time column.

Note that I expect this to be slow so we should look to give it
provisional approval but actually merge when it can be rolled out so it
doesn't snarl up our repo.

I would like to run it during the outage IF there seems to be time.

CRM-19821

Change-Id: Ia6baa4eeddfcc515808499b3c453428a3c086d26
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/56/335556/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 80f6a23..f3205cf 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -62,6 +62,8 @@
     wmf_civicrm_update_7290();
     wmf_civicrm_update_7300();
     wmf_civicrm_update_7310();
+    wmf_civicrm_update_7455();
+    wmf_civicrm_update_7460();
 }
 
 /**
@@ -2498,3 +2500,19 @@
   $tables = array('civicrm_contact' => array('nick_name'));
   CRM_Core_BAO_SchemaHandler::createIndexes($tables);
 }
+
+/**
+ * Add index to activity_date_time column.
+ *
+ * Without this index activities are basically unsearchable as we need to limit
+ * them to a time frame to make it manageable.
+ *
+ * Some performance discussion here.
+ *
+ * https://issues.civicrm.org/jira/browse/CRM-19821
+ */
+function wmf_civicrm_update_7460() {
+  civicrm_initialize();
+  $tables = array('civicrm_activity' => array('activity_date_time'));
+  CRM_Core_BAO_SchemaHandler::createIndexes($tables);
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/335556
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6baa4eeddfcc515808499b3c453428a3c086d26
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to