Ejegg has submitted this change and it was merged.
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, 16 insertions(+), 0 deletions(-)
Approvals:
Ejegg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index fcf45ef..c9862ed 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -51,6 +51,7 @@
wmf_civicrm_update_7120();
wmf_civicrm_update_7170();
wmf_civicrm_update_7180();
+ wmf_civicrm_update_7190();
}
/**
@@ -1885,3 +1886,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: merged
Gerrit-Change-Id: I623e9c9465521384dcc65dbcabfd1da734538d56
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits