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

Home -> Community -> Usenet -> c.d.o.misc -> Paged Cursors

Paged Cursors

From: Linus Concepcion <Linus_Concepcion_at_jh.com>
Date: 1997/11/25
Message-ID: <65fa5u$abv$1@earth.superlink.net>#1/1

Hi.

Is there a way to implement paged cursors in Oracle 7.X, or SQL Anywhere?

Basically, the problem I'm trying to solve is a lot like what has already been done on most search engines like Yahoo, Exite...

We want our users to be able to query our system tables. For example: They want all documents whose author is a "Smith"

Our engine should then generate the proper SQL to either backend, and just return the first 15 rows of the resultset. The 15 rows comprises a single page. The engine could also return the total number of pages in the resultset given that a page is 15 rows.

I really don't want to hold on to the server-side cursors after a page is returned. Ideally, I'd like for the first page to be returned to the user, then the cursor will be dropped. If the user then requests for page 3, the cursor is quickly recreated, and rows 30-45 are returned to the user. The cursor is then immediately dropped again.

Of course it is imperative that the user be able to go backwards. So from page 3, he/she can go back to page 2.

What is the "scalable" answer to this problem? Does it have anything to do with dropping the cursors so that not too many cursors are open at one time?

I do not frequent these newsgroups often, so I'd greatly appreciate a response by e-mail. Thanks in advance to all.

Linus_Concepcion_at_jh.com Received on Tue Nov 25 1997 - 00:00:00 CST

Original text of this message

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