Subject Re: How to mix ascending and descending fields in one index
Author kokok_kokok
Yes, I thought this solution. In fact, FB allows you to create indexs using expressions. It is not necessary to create a artificial column. For example:

CREATE INDEX IDX_PERSON_LASTNAME ON PERSONS COMPUTED BY (UPPER (LAST_NAME COLLATE DE_DE))


But I would like to find a direct way. If it does not exist, I will use the computed indexs as alternative.

Thank you



--- In firebird-support@yahoogroups.com, "÷ÁÌÅÒÉÊ íÙÔÉÎÓËÉÊ" <valeri.mytinski@...> wrote:
>
>
> 08.10.2009, × 17:30, kokok_kokok ÎÁÐÉÓÁÌ(Á):
>
> > In few words, index is absolutely necessary.
> >
> In my application I need index on calculated column.
> As FB doesn't allow index on such columns, I use following trick:
>
> - add normal column
> - calculate this column as needed in triggers
> - index works on this column
>
> May be this approach is applicable in your case too?
> It must be so if it possible to build two functions:
> 1) from A to desc A
> 2) from desc A to A
>
> Regards
>
> Valeri
>