Subject | Re: [firebird-support] case insensitive "where" clause |
---|---|
Author | Alexandre Benson Smith |
Post date | 2009-06-27T00:17:08Z |
bwc3068 wrote:
you don't have such an index FB would use a naturl table scan, wich
could be slow in large tables
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> Hi--use a case insensitive collation such as PT_BR for ISO8859_1 charset
>
> A simple question on making my where clauses case insensitive with FB 2.nn.
>
> is there an easier way then setting up the SQL like the below?
>
> select * from table
> where
> upper(field) like '%UPPERCASE LOOK FOR%'
> order by
> upper(field)
>
> is there a speed issue?if you have a expression index on UPPER(Column) then it would be ok, it
you don't have such an index FB would use a naturl table scan, wich
could be slow in large tables
> that is...will that resolve as fast as:It will be as fast (or better as slow), because both would not use an index.
>
> select * from table
> where
> field like '%LOOK FOR%'
> order by
> field
>
> thanks again!see you !
> regards
> kelly
>
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br