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

Search - Increase Performance by Separating Name and Email Criteria and Wildcard String Tail Only

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.7
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Rationale
      ========
      Currently, both Basic and Advanced Search provide a single search criteria field which queries on sort_name AND email address data, AND adds % wildcard to both front and back of string. This results in extremely inefficient queries, particularly problematic in larger datasets.

      Implementation
      ============

      • Modify Advanced Search forms to provide separate "Name" and "Email" input fields.
      • Modify search query construction to NOT automatically wildcard the beginning of either of these critieria. The tails should still be wildcarded.

      EXAMPLE:
      Name: Green
      Email: %yahoo

      Query contains:
      LEFT JOIN civicrm_location.... civicrm_email LIKE '%yahoo%'
      WHERE civicrm_contact.sort_name LIKE 'Green%'

        Attachments

          Activity

            People

            • Assignee:
              kiran.jagtap Kiran Jagtap
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: