Anmol, The OutOfMemoryException you are experiencing is simply the first symptom of the problem. Are you realistically expecting your user to view 10,000 records? Have you considered how long it will take for 10,000 records to be transferred to the browser?
You can allocate more memory to the JVM when you start your servlet container, but most likely the other points I make above will require you to review the way you are dealing with such a large quantity of data. A couple of days ago a working version of org.apache.torque.LargeSelect was committed to the jakarta-turbine-torque repository. LargeSelect has been constructed to make it easy to paginate large quantities of data. Instead of selecting 10,000 rows, LargeSelect instead selects a subset of the rows (say 500) and makes it easy for you to provide facilities that allow the user to page through them (say 100 records at a time). If the user pages off the subset of rows, LargeSelect grabs the next chunk of rows automatically. To use LargeSelect you will need to build torque from cvs head or wait for the next beta. HTH, Scott -- Scott Eade Backstage Technologies Pty. Ltd. Web: http://www.backstagetech.com.au > From: "Anmol Khanna" <[EMAIL PROTECTED]> > Reply-To: "Turbine Torque Users List" <[EMAIL PROTECTED]> > Date: Sun, 28 Jul 2002 17:01:20 +1000 > To: <[EMAIL PROTECTED]> > Subject: Out of Memory Problem > > Hi, > I am using Torque torque-3.0-b2. > > When I do a select on large number (10,000) of records I get an Out of > memory Exception. > For example: > > The following line gives an java.lang.OutOfMemoryError. The error occurs > when I create the list. > List responses =ULogPeer.doSelect(criteria); > Whats the best way to fix it? > Anmol > > > -- > 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]>
