Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Fetch cursor vs. TEMPORARY TABLE scrolling

Re: Fetch cursor vs. TEMPORARY TABLE scrolling

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 17 Dec 2006 13:42:50 -0800
Message-ID: <1166391767.812634@bubbleator.drizzle.com>


<f:chukcha> wrote:
> Hi all,
> I need to get over 2000 records from a table and then page through them
> and display 20 records at a time in my application. What is better: to
> CREATE GLOBAL TEMPORARY TABLE AS SELECT run the query once and then
> somehow scroll through the temp table OR declare a cursor and FETCH
> through the records 20 at a time?
>
> Is there a simpler "pure" SQL approach to this problem without using a
> FETCH?
>
> I try not to be tied to the Oracle way of doing things. My company will
> be moving to service oriented architecture soon and the architecture
> team is pushing me not to use oracle stored procedures. There is some
> talk about migrating from oracle to some other db...
>
> What are my options?
>
> Thank you in advance

Fetch into a global temporary table including a sequence number with each row as it is inserted or fetch into an array indexed by BINARY_INTEGER.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Dec 17 2006 - 15:42:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US