Subject | Re: [firebird-support] select fieldA >= xxx is very very slow on Big table ? |
---|---|
Author | Vander Clock Stephane |
Post date | 2010-12-20T07:52:14Z |
> If you are simply looking to confirm that *any* row exists, then thei just launch this query 7 min ago, i m still waiting the answer :( not
> following SQL is more appropriate/faster to use:
>
> SELECT 1 From RDB$Database where EXISTS(Select 1 from TABLEA where
> FIELDA >= xxx)
>
>
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]
>
>