T.J.Farrell writes:

> I was wondering about the performance incidence of :
> SELECT *  FROM table1 WHERE UPPER(field1) LIKE UPPER('%thomas%');
> versus:
> SELECT * FROM table1 WHERE field1 ~~ '%thomas%'

If you're comparing ~~ with LIKE then there's no difference at all. (Only
the extra cycles to convert LIKE to ~~ internally.) If you're comparing 
true case-insensitive matching to using UPPER, then the latter is probably
faster but doesn't really do the same thing.

-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Reply via email to