From: jbeal@jbeal.org (Jeremy Beal)
Newsgroups: comp.databases.oracle.misc
Subject: Re: Reading 100 rows at a time...
Date: Tue, 10 Oct 2000 17:51:07 GMT
Message-ID: <39e35656.103561433@News.ai.com>
References: <8rsmk7$1jr$1@nnrp1.deja.com> <39E21B31.85CA59DB@Unforgetable.com> <8rtclt$la8$1@nnrp1.deja.com>
X-Newsreader: Forte Free Agent 1.11/32.235
X-Original-NNTP-Posting-Host: 206.168.89.3
Lines: 17
NNTP-Posting-Host: 204.144.182.4
X-Trace: 10 Oct 2000 11:51:59 -0600, 204.144.182.4


On Mon, 09 Oct 2000 21:17:56 GMT, sergey_s@my-deja.com wrote:

>Well, I am actually using PL/SQL. I have a big table and I would like
>to select the first 100 rows out of it and then the next 100, and then
>the next 100, and so on. I am hoping to reduce the processing time by
>reading, caching and operating on a chunk of 100 rows at a time.
>
>Do you know how to do that in PL/SQL?


A PL/SQL option would be to use a cursor variable and take advantage
of the %ROWCOUNT attribute to keep track of the count of rows read.

Unrolling the SELECT into a cursor might provide worse performance
than using MINUS to restrict to certain ROWNUM values.



