Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.1.1
-
Fix Version/s: Future Version
-
Component/s: Core CiviCRM
-
Labels:None
Description
CiviCRM generally has too many indexes (which slows down inserts) and the existing indexes are not very well defined (which slows down searches). This stems from research that I've been doing in [CRM-5556]. One area for improvement is with indexes on any is_primary fields. We never do searches just for all primary records in a table. That search is always combined with something else, usually "show me the primary (email/address/etc.) for this contact". In fact that's the way we normally JOIN tables "INNER JOIN civicrm_foo f ON (c.id = f.contact_id AND f.is_primary = 1)". In these cases it's going to be better to combine these two indexes.
This applies for civicrm_email, civicrm_address, and probably others.
This applies for civicrm_email, civicrm_address, and probably others.
might want to combine all issues under one big issue and/or sub-tasks if you are going towork on it and submit patches to it