CRM-17315 - CiviReport - Membership Contribution Details report - index the temporary...
authorJon goldberg <jon@palantetech.coop>
Wed, 30 Sep 2015 21:25:15 +0000 (17:25 -0400)
committerJon goldberg <jon@palantetech.coop>
Wed, 30 Sep 2015 21:25:15 +0000 (17:25 -0400)
CRM/Report/Form/Member/ContributionDetail.php

index 489253bea62b72147a8825f6156d6580540157dc..c2d2fe243f32ab142be68e529c4094eb1970ca09 100644 (file)
@@ -542,7 +542,8 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form {
     CRM_Core_DAO::executeQuery($dropTempTable);
 
     $sql = 'CREATE TEMPORARY TABLE civireport_membership_contribution_detail
-            (contribution_id int, contact_id int, membership_id int, payment_id int) ENGINE=HEAP';
+            (contribution_id int, INDEX USING HASH(contribution_id), contact_id int, INDEX USING HASH(contact_id), 
+            membership_id int, INDEX USING HASH(membership_id), payment_id int, INDEX USING HASH(payment_id)) ENGINE=MEMORY';
     CRM_Core_DAO::executeQuery($sql);
 
     $fillTemp = "