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: how to display partial results from a query (effectively)

Re: how to display partial results from a query (effectively)

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Tue, 29 Oct 2002 15:14:50 GMT
Message-ID: <KBxv9.154697$qM2.47735@sccrnsc02>


Look at asktom.oracle.com
Lots of discussion there.
Jim
"Sharkie" <sharkdba_at_yahoo.com> wrote in message news:423b5ab1.0210281427.5e89b604_at_posting.google.com...
> Oracle 8.1.7 / Sun Solaris
>
> I have a query against a users table which usually returns several
> hundreds records. These records are displayed on a web page
> 10 at a time, with a next/previous buttons. The problem is,
> the query is always executed "in full" so to speak. There is
> a CGI counter, and if the rowcount matches current page,
> it is displayed, otherwise not.
>
> some pseudocode for page 2:
>
> count=0;
> <loop through this query:
> select blahblah from users where blahblah order by blahbhal>
> count++;
> //this is page 2, so display only results 11 through 20
> if (count between 11 and 20)
> <td>display row here</td>
> else null; //this is the problem, this runs for a long time
> </loop through this query>
>
>
> Since the query has to finish, it will sometimes take a long
> time to display the 10 results. There has to be a better way
> of doing this. Isn't there a way in oracle to quickly only return
> rows between certain rowcounts?
Received on Tue Oct 29 2002 - 09:14:50 CST

Original text of this message

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