good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^4: Backslash and Underscore problem with DBI and PostgreSQL.by Seumas (Curate) |
on Jun 21, 2004 at 23:58 UTC ( [id://368585]=note: print w/replies, xml ) | Need Help?? |
I didn't expect lower() to have much of a speed impact and the query plan shows that the difference between doing a straight '=' or '~~*' and lower() is only 44msec versus 54msec.
My indexes are pretty tight and it's a well (and often) maintained database. With millions of records, it has to be. :) The reason I didn't use LIKE is that I'm trying to allow users to create usernames that contain any characters they want without having to manually escape dozens of special characters myself.
In Section
Seekers of Perl Wisdom
|
|