Address extraneous location queries
When importing a 'contact with a donation' 18% of the total queries come from this line of code for this issue. I believe the handling in the create classes likely makes it obsolete.
I'm going to dig a bit further on that & put up a PR with the case for removing the line (unless I find a reason not to)
Per #2033 (closed)
examples - openid queries make up 4% of the total queries! and the line is 18% when including all location entities. This would be higher if it were only Contact.create that were being called
timestamp | query | seconds | rows found | columns requested |
---|---|---|---|---|
Location queries | 15/09/20 2:54 | SELECT * FROM civicrm_openid WHERE ( ( is_primary = 0 OR is_primary IS NULL ) ) AND ( civicrm_openid .contact_id = 46011839 ) |
0.000643 | 0 |
Location queries | 15/09/20 2:54 | SELECT * FROM civicrm_openid WHERE ( ( is_primary = 0 OR is_primary IS NULL ) ) AND ( civicrm_openid .contact_id = 46011840 ) |
0.000517 | 0 |
Location queries | 15/09/20 2:54 | SELECT * FROM civicrm_openid WHERE ( ( is_primary = 1 ) ) AND ( civicrm_openid .contact_id = 46011834 ) |
0.001377 | 0 |