Subject Re: [firebird-support] select fieldA >= xxx is very very slow on Big table ?
Author Vander Clock Stephane
> If you are simply looking to confirm that *any* row exists, then the
> following SQL is more appropriate/faster to use:
>
> SELECT 1 From RDB$Database where EXISTS(Select 1 from TABLEA where
> FIELDA >= xxx)
>
>

i just launch this query 7 min ago, i m still waiting the answer :( not
very fast ...


Select 1 from TABLEA where FIELDA >= 487
it's take 8 seconds

Select 1 from TABLEA where FIELDA = 487
around150 ms

Select 1 from HASH where X1_Y1 > 486 and X1_Y1 < 488
around150 ms

Select 1 from HASH where X1_Y1 > 486 and X1_Y1 < 200000000
around 8 seconds

with all this select, the page was already in memory because no hard
disc activity
With hardisc activity it's much much longer

st├ęphane

> Sean
>
>


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