Subject | Re: [firebird-support] Re: Subset query |
---|---|
Author | Aage Johansen |
Post date | 2006-03-08T19:27:55Z |
willy_metra wrote:
...
where (INDEXEDFIELD1 > '8.3.2006 00:00:00' and
INDEXEDFIELD1 < '8.3.2006 00:10:00')
and INDEXEDFIELD2+0 < '8.3.2006 00:00:00'
--
Aage J.
> ...Would just ignoring the second index help? E.g.:
> I'm trying to do:
>
> select
> *
> from
> TABLENAME
> where
> (INDEXEDFIELD1 > '8.3.2006 00:00:00' and INDEXEDFIELD1 < '8.3.2006
> 00:10:00') and INDEXEDFIELD2 < '8.3.2006 00:00:00'
>
> Both where-fields are indexed, but the problem is that the first
> where-predicate is done very quickly due to short condition range,
> it's just 10 mins. But the second one is very long, cuz it's going
> through the whole db. So i'm trying select the first subset via the
> first where-predicate and than apply the second where predicate on
> the selected subset.
...
where (INDEXEDFIELD1 > '8.3.2006 00:00:00' and
INDEXEDFIELD1 < '8.3.2006 00:10:00')
and INDEXEDFIELD2+0 < '8.3.2006 00:00:00'
--
Aage J.