Subject Re: [Firebird-Architect] Cursors
Author David Jencks
On Saturday, June 5, 2004, at 08:54 AM, Ann W. Harrison wrote:

> At 11:28 AM 6/4/2004, Miroslav Halas wrote:
>
>> My question was if you can suggest solution if I have table with let
>> say
>> 100,000 records and I want to display record 50,000 - 50,010? How to
>> do
>> it effectively and fast?
>
> One of the principles of relational databases is that all information
> is contained in the data. The location of the data is irrelevant. The
> order of the data is irrelevant and mutable, unless the query specifies
> that it be sorted by some data. One long term goal is to allow
> parallel
> searches across disks which will actually return data in different
> order
> depending on the loads on the disks.
>
> This is a long winded and pedantic way of saying that your query
> doesn't
> make sense. Unless the records are numbered, there is no 50,000th
> record.

Well, it makes sense if he includes an order by clause. But there is
no way to determine the desired records in that case other than
determining at least the first 50,010 records. So, the "first...skip"
solution is as good as possible.

david jencks
>
> Regards,
>
>
> Ann
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>