tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sourabh Kulkarni" <soura...@geometricsoftware.com>
Subject Re: DB Connection
Date Wed, 28 May 2003 08:26:51 GMT
In case of large number of  records in the ResultSet, you need pagination.
Search the archives of j2ee-patterns for interesting discussions on this
topic.
 http://archives.java.sun.com/archives/j2eepatterns-interest.html

HTH,
-Sourabh Kulkarni
sourabhk@geometricsoftware.com

"Discretion is being able to raise your eyebrow instead of your voice"

************************************************************************
This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named above.
If you are not the intended recipient, please do not review, disclose,
disseminate, distribute or copy this e-mail and attachments. If you have
received this communication in error, please notify the sender immediately
by email or telephone at +91-20-2906219
************************************************************************

----- Original Message -----
From: "Munteanu Gabriel" <gmunteanu@rdslink.ro>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, May 28, 2003 1:42 PM
Subject: Re: DB Connection


> Guys, this is very interesting discussion.
> I have read all the posts.
> I still have another problem.
> What about VERY large Result Sets?
> I have a portal with 1 000 000 records[books related].
> When the user searches for romance, there are more than 200 000 records
> returned.
> I can't use CachedResultSet [I would have to hold all this in memory, in
an
> object registerd in the HTTPSession]
> also I can't use the ArrayList.
> I am also using a DB pool system and I want to return the connection.
> Is there a solution? [better said an optimal solution].
> If the ResultSet doesn't hold all the records in memory[RAM],
> (setFetchSize(int) -> sets how many rows to be brought into memory), where
> is the rest? A concrete case:
> "select name from books" -> returns 850 000 records.
> statement->setFecthSize(25);
> the rest of 849975 records are left in the database?, on the hard-disk? or
> the database is making all this resultset
> internally, and itself uses RAM and some swap? Does anyone knows all this
> internal action, how it is going on?
>
> Comments, URLs appreciated.
> Info: I use Postgresql if it counts.
> In the case that I will have to not return the connection to the pool,
and,
> because ResultSet doesn't hold in memory all the records I would save it
int
> the HTTPSession, HOW AM I going to know when to release it and return the
> connection to the pool?
>
> Thank you very much in advance.
>
>
> ----- Original Message -----
> From: "Ralph Einfeldt" <ralph.einfeldt@uptime-isc.de>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Tuesday, May 27, 2003 11:01 PM
> Subject: RE: DB Connection
>
>
> It's a pretty common solution, you may also look for a cached ResultSet:
>
> http://freshmeat.net/projects/crs/?topic_id=66
> http://developer.java.sun.com/developer/earlyAccess/crs/ (Requires login)
> http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html
>
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
> /RowSetDynaClass.html
>
> > -----Original Message-----
> > From: Jan Behrens [mailto:jan@diekleinedomain.de]
> > Sent: Tuesday, May 27, 2003 12:08 PM
> > To: Tomcat Users List
> > Subject: RE: DB Connection
> >
> > This leads me to the conclusion, that I have to copy the
> > extracted data into an Array for further processing. Is
> > that a reasonable approach or is there a better practice?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message