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.