Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6, 4.7
-
Component/s: None
-
Labels:
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
If you do a contribution search - ie from the contribution search screen the query includes retrieving grant fields - even though these are not relevant (& have a performance cost). The sql includes "civicrm_grant.amount_requested as grant_amount_requested, civicrm_grant.amount_granted as grant_amount_granted, civicrm_grant.amount_total as grant_amount_total, civicrm_grant.application_received_date as grant_application_received_date , civicrm_grant.grant_report_received as grant_report_received, civicrm_grant.money_transfer_date as grant_money_transfer_date FROM civicrm_contact contact_a"
This was added here - the commit doesn't have a JIRA ref in it and I'm unsure why it made sense to stop checking what component was being queried. We need to start being much more careful about making really frequent queries add fields and data that they don't need because it slows the system down for people