Subject Re: [firebird-support] Re: Fixing Database
Author Aage Johansen
salisburyproject wrote:
> ...
> Now, another question, related to the big selects, discussed here.
> Supposed I know that the select may return high number of records
> (thousands and more). How can I limit the number of records returned?
> Get them by predfined blocks? Is there something similar to the LIMIT
> clause (as in MySQL?). I've been looking in the Interbase
> documentation, and seems the only answer is to use CURSOR. Or am I
> wrong? Sorry, but as I said, I'm newbie to FB/IB.


If what you want is 'no sorting of potentially huge result sets', you might
consider having the 'order by' satisfied by an index - if you're "lucky" Fb
will just follow the index chain. This is normally slower than a sort, but
in your case the sort seems to cause problems.
Otherwise, the first/skip syntax might be a solution, but I suspect that
for a series of large skip's you may find the speed to be less than
satisfactory.

--
Aage J.