posted 20 years ago
hi:
How can I retrieve a big list from the database without consuming so much memory?
In my model, I use transfer objets to bring the data from the database to my application. Basically, I read every row from the ResultSet, then I encapsulate it into a corespondent object. But, what will happen if I have too many rows in the ResultSet? I will have to create too many objects, which will take too much memory.
Not: Also, I want to mentain a relationship to the acual record, for example: I want to retrieve all the the internet providers from the database, and display the name to the user, when the user click on the name, my DAO should retrieve the provider data and display it to the user. But if I have 1000 providers, I will have to create 1000 objects.
how can I solve this problem?
I am new to the database stuff, and any help is appreciated.
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle