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

possibly removing LOWER from email queries

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      A quick grep tells me that we're using LOWER(email) on email searches. This is a real performance killer since this means the index is never used. However is it necessary to have mixed case email addresses? Perhaps we could always use strtolower() when we insert/update an email, and remove LOWER() from the queries. I did some tests on a 300k email table and this results in a 725% performance improvement on these queries.

        Attachments

          Activity

            People

            • Assignee:
              mover Michał Mach
              Reporter:
              dalin dave hansen-lange
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: