Subject Re: [Firebird-Architect] Bi-directional indexes
Author Alexandre Benson Smith
Ann W. Harrison wrote:

>Or maybe there's some other mechanism entirely to solve the "I want
>fifty records at a time" problem...
>
>Regards,
>
>
>Ann
>
>
Ann,

I think I will say something stupid now... but forgive my stupidity... :-)

The problem lies on frist X/skip Y type of queries right ?

Could be a possibility to make a "permanent" result set ?

Like this:

Select first 20 skip 0 from Customers order by Name desc KEEP RESULTSET X

(here the server will do a big job ordering it without an index)

the next query will be something like this:

select first 20 skip 20 from Customers order by Name desc USE RESULTSET X

the engine will just re-use the already computed result set.

select first 20 skip 40 from Customers order by Name desc USE RESULTSET X

and so on...

when it's done just

RELEASE RESULTSET X

Some kind of internal cursor, or simplified Transient Data Set

Don't know if it's make sense, or are doable, just a diferent approach
to keep a consistent and already done (filtered and ordered) result set
do be fetched in parts.

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.1/28 - Release Date: 24/06/2005