Eileen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/273962
Change subject: Add index to civicrm_contribution.total_amount
......................................................................
Add index to civicrm_contribution.total_amount
Bug: T128221
Change-Id: I623e9c9465521384dcc65dbcabfd1da734538d56
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/62/273962/1
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index fcf45ef..b4320ce 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -1885,3 +1885,18 @@
v.name IS NULL
");
}
+
+/**
+ * T128221 add index to civicrm_contribution.total_amount.
+ *
+ * Note that I made this a combined index with receive_date because the ticket
included
+ * both criteria and they seemed likely to be used in conjunction to me in
other cases.
+ *
+ * I ran the offending search on staging afterwards and it was fast.
+ */
+function wmf_civicrm_update_7190() {
+ civicrm_initialize();
+ CRM_Core_BAO_SchemaHandler::createIndexes(array(
+ 'civicrm_contribution' => array(array('total_amount', 'receive_date')),
+ ));
+}
--
To view, visit https://gerrit.wikimedia.org/r/273962
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I623e9c9465521384dcc65dbcabfd1da734538d56
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits