Caching a Resultset 2005-02-08 - By Sanjeev K.R
Back Hi, We have around 20000 - 40000 of record in a table, We are using JSP and a front controller(Servlet) and some DAO's We have implemented Pagination also.... We have a performance set back,we are displaying 10 record at a time in a page, We are using the absolute potion of the ResultSet to fetch the next 10 records, can anyone help me in achiving a better performance, I cannot built all the 20000 objects at the same time in my DAO, How can i cache the result set? or the query..... My code goes some thing like this... [ DBConnection dbConn = manager.getConnection(); Statement stmt = dbConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE ,ResultSet.CONCUR_READ_ONLY); EnquireMaintainOrderVO enquireOrder=((EnquireMaintainOrderVO)query); ResultSet rs = stmt.executeQuery(getQuery(enquireOrder)); rs.absolute(((Integer)param).intValue()); ] Please can anyone throw some light on this ASAP..
Thanks & regards Sanjeev
-- ---- ---- ---- ---- ---- ----- Do you Yahoo!? Yahoo! Mail - You care about security. So do we.
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
<DIV>Hi,</DIV> <DIV>We have around 20000 - 40000 of record in a table,</DIV> <DIV>We are using JSP and a front controller(Servlet) and some DAO's</DIV> <DIV>We have implemented Pagination also....</DIV> <DIV>We have a performance set back,we are displaying 10 record at a time in a page,</DIV> <DIV>We are using the absolute potion of the ResultSet to fetch the next 10 records,</DIV> <DIV>can anyone help me in achiving a better performance,</DIV> <DIV>I cannot built all the 20000 objects at the same time in my DAO,</DIV> <DIV>How can i cache the result set? or the query.....</DIV> <DIV>My code goes some thing like this...</DIV> <DIV>[</DIV> <DIV><FONT size=2>DBConnection dbConn = manager.getConnection(); </FONT></DIV> <DIV><FONT size=2>Statement stmt = dbConn.createStatement(ResultSet.TYPE_SCROLL _INSENSITIVE,ResultSet.CONCUR_READ_ONLY);</FONT></DIV> <DIV><FONT size=2>EnquireMaintainOrderVO enquireOrder=((EnquireMaintainOrderVO )query);</FONT></DIV> <DIV><FONT size=2>ResultSet rs = stmt.executeQuery(getQuery(enquireOrder));< /FONT></DIV> <DIV><FONT size=2>rs.absolute(((Integer)param).intValue());</DIV></FONT> <DIV>]</DIV> <DIV>Please can anyone throw some light on this ASAP..</DIV> <DIV> </DIV> <DIV> </DIV> <DIV>Thanks & regards</DIV> <DIV>Sanjeev</DIV> <DIV> </DIV><p> <hr size=1>Do you Yahoo!?<br> <a href="http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions .yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - You care about security. So do we. =========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". <p>
|
|