Subject | RE: [firebird-support] Searching on BLOB data - case sensitive |
---|---|
Author | Nigel Weeks |
Post date | 2005-06-02T23:22:41Z |
> A sure fire way isThis one's 'upper' is unnecessary - the 'CONTAINING' method is already case
> select
> description
> from
> items
> where
> upper(description) containing 'COMPUTER'
>
insensitive.
All these searches involve converting all fields to upper case, then testing
for a match - quite heavy on large numbers of records.
It's far better to dedicate a field in your table to storing the upper case
version of a field, and use that in your searches. That way, an index can be
used on it, and you save doing table scans converting the case before each
comparison.
Nige.