manish ahuja wrote:Paul:
yes thats the question I meant to ask initially. Can I stagger the records retrieved that i fetch upfront currently. I don't need them all together but since earlier the volumes were low and we could retrieve them all at once we fetched everything in one go.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
manish ahuja wrote:We could but the additional database round-trip to fetch each record in this case will have a significant impact on the performance.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Save India From Corruption - Anna Hazare.
Paul Clapham wrote:Then you are building the ResultSet in such a way that all of its records get loaded into memory at the same time. Try to avoid doing that.
| Consider Paul's rocket mass heater. |