Hi there,

Is it expected that using the LOWER function should greatly increase query
time?  Or is there a MySQL setting that can help speed it up?  Below are the
results of a query against a table that has an index on cols (email,cust).
Using LOWER increases the query time by 10.5 seconds. (eek!)

I've fixed the scripts that input data into the ind table so that emails are
now first converted to lower case before being inserted, but was curious if
doing some data mining to fix the existing emails is the only (probably
best) solution.

Thanks,
Joe

SELECT t.id, t.Name, t.city
  FROM ind t
 WHERE t.cust=1
   AND t.email='[EMAIL PROTECTED]';

1 row in set (0.01 sec)

SELECT t.id, t.Name, t.city
  FROM ind t
 WHERE t.cust=1
   AND LOWER(t.email)='[EMAIL PROTECTED]';

1 row in set (10.52 sec)


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to