Extraneous queries - activiies
Per #2033 (closed) when doing query analysis on creating 7 contacts with 7 contributions I found that around 10% of the queries were looking up activity contacts.
In other words 2 queries for each record type for each contribution. In fact these are new contributions so no existing records exist & that can hopefully be pre-determined
Examples
timestamp | query | seconds | rows found | columns requested |
---|---|---|---|---|
15/09/20 2:54 | SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact .activity_id = 112183025 ) AND ( civicrm_activity_contact .contact_id = 46011835 ) AND ( civicrm_activity_contact .record_type_id = 2 ) |
0.000549 | 0 | 0 |
15/09/20 2:54 | SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact .activity_id = 112183025 ) AND ( civicrm_activity_contact .record_type_id = 1 ) |
0.000606 | 0 | 0 |
15/09/20 2:54 | SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact .activity_id = 112183025 ) AND ( civicrm_activity_contact .record_type_id = 2 ) |
0.000725 | 0 | 0 |
15/09/20 2:54 | SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact .activity_id = 112183025 ) AND ( civicrm_activity_contact .record_type_id = 2 ) |
0.000605 | 1 | 1 |
15/09/20 2:54 | SELECT * FROM civicrm_activity_contact WHERE ( civicrm_activity_contact .activity_id = 112183025 ) AND ( civicrm_activity_contact .record_type_id = 3 ) |
0.000636 | 0 | 0 |