Subject Re: [firebird-support] Changing COLLATION from UTF8 to UNICODE_CI_AI slows down select
Author Paul Vinkenoog
Hello Werner,

> > 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?

I suppose that CEPAGE_SYN_IDX1 orders on NAME, not UPPER(NAME).

(...)

>> I would like to be able to search ignoring case and accent in both the
>> column and the search criteria.

You can create expression indexes, e.g. on upper(name) and anything
else you'd like to search or sort on.

See http://www.firebirdsql.org/refdocs/langrefupd21-ddl-index.html#langrefupd21-creatind-on-expr


Hope this helps,
Paul Vinkenoog