Subject | Re: using computed index (only_decimal_chars) |
---|---|
Author | tomjanczkadao |
Post date | 2010-01-14T21:06:40Z |
Hi
Actually i didn't solve the problem.
I got both ascending and descending indexes, none is used.
For a now query's time is acceptable, but number of records is increasing so problem will back sooner or later.
Creating integer column and trigger seems to be good walk around, but i'm still curious how to use computed index. If there is possibility to create it, then must be the way to use it.
Regards, Tomek
Actually i didn't solve the problem.
I got both ascending and descending indexes, none is used.
For a now query's time is acceptable, but number of records is increasing so problem will back sooner or later.
Creating integer column and trigger seems to be good walk around, but i'm still curious how to use computed index. If there is possibility to create it, then must be the way to use it.
Regards, Tomek
--- In firebird-support@yahoogroups.com, "Ann W. Harrison" <aharrison@...> wrote:
>
> Fernando Medeiros wrote:
> > how you solved the problem ?
> >
> I think that what Fernando intended to suggest was:
>
> Create an integer column and a trigger that invokes
> your stored procedure to populate that column from
> the field that has mixed numbers and letters. Index
> the new column.
>
> But I think your problem is actually that you need
> a descending index to resolve a MAX query. Firebird
> indexes are uni-directional, so an ascending index
> can optimize a MIN but you need a descending index
> to optimize a MAX.
>
> Good luck,
>
> Ann
>