Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1299

JOIN and WHERE conditions need optimization

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: None
    • Labels:
      None

      Description

      Fixed conditions should never be in the ON clause of a JOIN.

      Example fixed conditions:
      civicrm_location.entity_table = 'civicrm_contact'
      civicrm_email.is_primary = 1
      civicrm_location.is_primary = 1

      These are all in the ON clause of their JOINs. The queries will speed up immensely if you move them to where the they belong, the WHERE clause.

        Attachments

          Activity

            People

            • Assignee:
              sameermare Sameer Mare
              Reporter:
              davidstrauss David Strauss
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: