On 3 May 2010, at 9:53am, Ian Hardingham wrote:

> For various embarrassing reasons, I'm using:
> 
> SELECT x FROM userTable WHERE name LIKE 'name'
> 
> To look up entries in my account table.   Basically, the scripting 
> language I'm using which hooks into SQLite is a bit case-agnostic.
> 
> I've been told by a friend that this is extremely inefficient, and that 
> I should UPPER my 'name' column and my query name in order to get it to 
> be fast.
> 
> Can anyone tell me the easiest way of doing this?

Your friend is used to other versions of SQLite.  Your best bet is to define 
the field you're searching on as having COLLATE NOCASE.  This means that all 
indexing and searching on it will ignore case.  See sections 6 and 6.3 in

http://www.sqlite.org/datatype3.html

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to