The way I've done it is similar to number 2 but I did it all in Java using
cursors. I execute the query every time the user clicks next/previous. I
setFetchSize() instead of setCursorName(). Not sure how this will work as it
is a work in progress.

----- Original Message -----
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 11:43 AM
Subject: Re: [OT] RE: Struts and Large ResultSet


> Two choices:
>     1)  Write a stored procedure
>         - will still have to muddle through the rows at the beginning of
> the result before it starts giving you what you want
>         - still database dependent
>     2)  Use a DBMS that provides the START, LIMIT options for the SELECT
> clause (like PostgreSQL)
>         - still database dependent
>         - works quite well (this is mature functionality)
>         - *only* retrieves those rows you ask for (you don't have to
> wade through the ones you've already seen)
>
> ... if you really want to *just* bring back twenty rows out of 2
> million, it seems that (2) offers the best solution.  Yes, it's tightly
> coupled to a given DBMS.  That DBMS is open source, and quite good
> though.  (I'm nearly certain there are OS DBMS implementations other
> than PostgreSQL that offer this functionality, but none come to mind.)
>
> If database independence is your primary goal, I'd suggest you go with
> something like OJB (http://jakarta.apache.org/ojb).  You can utilize
> "lazy loading" of dependent data to help stream-line your results (only
> the PKs will be retrieved; full objects are materialized on access)
>
> Regards,
>
> Eddie
>
> Ashish Kulkarni wrote:
>
> >Hi,
> >But is there a way to write some thing, which is
> >database independent, so u can change the database
> >without any code modification,
> >what i am trying it using CachedRowSet, i load the
> >resultset into a cachedrowset and then display it page
> >by page,
> >now only think i have to figure is, how can i load
> >only few records in this rowset, like if i have 1
> >million records, just load say 1000 records, iterate
> >through them, if u reach end of cache load another
> >1000, and so,
> >since a user will never go through a process of seeing
> >million records at a time, may be 1000 the max...
> >most user will use some thing like "Go To" to point at
> >a specific record in database,
> >I hope this thing works out well
> >Ashish
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to