Subject | Re: [firebird-support] query speed - confusing |
---|---|
Author | Arno Brinkman |
Post date | 2009-08-12T12:45:07Z |
Hi,
Can't you try to find a way to use an index for filtering on:
Maybe an expression index something?
Regards,
Arno Brinkman
ABVisie
> I'm trying (and failing) to understand why these 2 queries haveThe last query can use an index, because the order by clause in that query.
> different plans and hence different execution times, the first takes
> around 250ms and the other takes 125ms. I know these sound very small
> but this database has only 1% of the data (although the selectivity
> will be similiar).
Can't you try to find a way to use an index for filtering on:
> WHERE O.ACTIVESTATUS = 0 AND UPPER(O.OSIDENT) STARTING WITH '110';Why UPPER() ? if you check for numbers '110' ?
Maybe an expression index something?
Regards,
Arno Brinkman
ABVisie