Moray McConnachie wrote:
> > > SELECT * FROM mydb WHERE description LIKE "%foobar%";
> > > it seems to be case sensitive. Is there a way to do it so it is NOT
> > > case-sensitive?
> > SELECT * FROM mydb WHERE lower(description) LIKE "%foobar%";
>
> Brings up an interesting question. Which is faster, to use the lower/upper
> functions as above
[...]
> or to use the pattern matching case-insensitive operator?LIKE seems to be much simpler then the regex pattern
matching,
so IMHO, the lower/upper & LIKE combination may be faster for short
fields,
but probably might be slower on very long text fields (when it has to
convert
whole thing to lower/upper case, before doing LIKE). Anyway, the differences are probably almost none either way.
bart
--
bart@bart.w-wa.pl || http://www.bart.w-wa.pl