Subject Re: [firebird-support] Changing COLLATION from UTF8 to UNICODE_CI_AI slows down select
Author Werner F. Bruhin
Anyone has some tips/hints on this?

On 12/11/2010 17:16, Werner F. Bruhin wrote:
> I am doing the following select:
>
> SELECT NAME FROM CEPAGE_SYN WHERE UPPER(NAME) STARTING 'SEMILLON' ORDER
> BY NAME;
>
> PLAN (CEPAGE_SYN ORDER CEPAGE_SYN_IDX1)
>
> Why is the above not using the index but below is?
>
> SELECT NAME FROM CEPAGE_SYN WHERE NAME STARTING 'Semillon' ORDER BY NAME;
>
> PLAN (CEPAGE_SYN ORDER CEPAGE_SYN_IDX1 INDEX (CEPAGE_SYN_IDX1))
>
> With this it is using the index again:
> SELECT NAME FROM CEPAGE_SYN WHERE NAME STARTING 'Semillon' collate
> UNICODE_CI_AI ORDER BY NAME;
>
> But upper/lower case of search criteria and column content have to match.
>
> I would like to be able to search ignoring case and accent in both the
> column and the search criteria.
>
> Any hints would be very much appreciated.
>
> Werner
>
>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>