Subject Re: SV: [firebird-support] select fieldA >= xxx is very very slow on Big table ?
Author Vander Clock Stephane
> WHAT! Both selecting from RDB$DATABASE and EXISTS should normally be
> very fast. Tell us more (PLAN of this query and the '= 487' query),
> Stephane, and rerun the RDB$DATABASE query to verify your findings.
>

i promise you! it's take 12 min to return the first time we execute the
query ! next execute take only 6 secondes (that is still very very slow)
the plan is :

SELECT
1
From
RDB$Database
where
EXISTS(Select 1 from HASH where X1_Y1 >= 487)

PLAN (HASH INDEX (HASH_X1_Y1_IDX))
PLAN (RDB$DATABASE NATURAL)

Indexed Read: 172
Non Indexed Read: 1

and HASH_X1_Y1_IDX is an index on X1_Y1
Create index HASH_X1_Y1_IDX on Hash (X1_Y1);

stéphane

> Set
>
>


[Non-text portions of this message have been removed]