[development] Performance problems with LOWER() (http://drupal.org/node/83738)

Bill Moran wmoran at potentialtech.com
Sat Nov 17 02:06:59 UTC 2007

"Khalid Baheyeldin" <kb at 2bits.com> wrote:
> The LOWER issue that is being refered to is this
> http://drupal.org/node/83738.
> I have voiced my concern, together with others, on adding so many columns
> just to get around the case sensitive of a database that is not much in use.

I agree with your concern 100%.

In PostgreSQL, the correct way to solve this problem would be to
add an index:
create index lower_name on users (LOWER(name));

Said index will then be used any time a WHERE clause references
LOWER(name).  This avoids the problems of adding a column.
Does MySQL not have this capability?

Bill Moran

More information about the development mailing list