Subject | Re: [firebird-support] select fieldA >= xxx is very very slow on Big table ? |
---|---|
Author | Markus Ostenried |
Post date | 2010-12-19T20:49:19Z |
On Sun, Dec 19, 2010 at 21:08, Vander Clock Stephane
<svanderclock@...> wrote:
I think Firebird has to get all those records first and then will
return only the first to you.
Can't you narrow your result down some more?
<svanderclock@...> wrote:
> Hello,How many records would be returned without the FIRST...SKIP clause?
>
> why this simple sentence :
>
> Select
> First 1 skip 0 ID
> from
> TABLEA
> where
> FIELDA >= xxx
> PLAN (TABLEA INDEX (FIELDA_IDX))
>
> is very slow on big table (> 20 000 000 rows) ... it's take more than 10
> seconds to return :(
>
> this is an index on FIELDA
>
> did i do something wrong ?
I think Firebird has to get all those records first and then will
return only the first to you.
Can't you narrow your result down some more?