Subject Re: [firebird-support] select fieldA >= xxx is very very slow on Big table ?
Author Vander Clock Stephane
hmm, their is no order by so i don't thing it's connected ...
without the First 1 skip 0 i thing around 500 000 rows

On 12/19/2010 11:49 PM, Markus Ostenried wrote:
>
> On Sun, Dec 19, 2010 at 21:08, Vander Clock Stephane
> <svanderclock@... <mailto:svanderclock%40yahoo.fr>> wrote:
> > Hello,
> >
> > 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 ?
>
> How many records would be returned without the FIRST...SKIP clause?
> 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?
>
>


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