If you can use a stored procedure instead of a multiple SQL statements then it would improve your performance significantly. The advantages are obvious but then if you plan to develop a solution that works on the different types of databases then this solution may not work. We did this in many situations and have seen a significant improvement.
Thanks, Milind -----Original Message----- From: Zoran Avtarovski [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 3:41 AM To: Struts User Group Subject: Data Access Optmizing I have a small struts web app which stores user entered information in a DB and then it performs some calculations on the data and spits out a results page. The app is working fine but I'm seeing some performance issues with regards to data access. I'm using simple data access objects which connect to a container managed JNDI pool. I can retrieve large amounts of data quite quickly but when I use nested connection performance really suffers. By nested calls I mean that say I retrieve a Collection of a couple of thousand user response objects (which are retrieved quite quickly) and then I process the responses by iterating through them to produce a Collection of user feedback objects. During each cycle I make a number of database calls to get information related to processing the individual user response. This is where things get really sloooooooow. What I'm after is some pointers on what the best practise in dealing with this situation is. How do others get around this issue? My thinking is that it's not the data access method (simple DAO's) but more the fact that I'm opening and closing so many connections during the processing phase. Any help would be really appreciated. Zoran --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

