Subject | Re: select very slow for no reason / First Skip seam to no work efficiently ! |
---|---|
Author | svanderclock |
Post date | 2009-12-05T13:53:12Z |
Dimitry, you are my hero !!
simply need to add
plan (BIGTABLE order thegoodindex)
order by UserID desc,
randomseed desc
solve the probleme !! (need to add the plan because unfortunatly the engine not always select the good plan)
thanks !!!
simply need to add
plan (BIGTABLE order thegoodindex)
order by UserID desc,
randomseed desc
solve the probleme !! (need to add the plan because unfortunatly the engine not always select the good plan)
thanks !!!
--- In firebird-support@yahoogroups.com, Dimitry Sibiryakov <sd@...> wrote:
>
> > so why in the previous request, Whith
> > Select First 200 skip 0 it's look like that
> > the engine scan all the table (5 800 000 indexed read)
> > when i want only the First 200 ? like you see
> > in the second query if i force que engine
> > to return only the first 200 records by a filter
> > instead by the first 200 skip 0 it's very
> > fast...
>
> First query can't use plan ORDER because your clause "order by"
> doesn't include all fields from index. Change it to "order by UserID
> desc, randomseed desc".
>
> SY, SD.
>