What hapens internally when i execute rs.next() or when I receive multiple resultsets?
posted 7 years ago
As per the info. i got from Net,
It depends on the driver implementation. It may go back to database and fetch the next row.
Or all data may come and sit inside the Java memory as objects and can be served.
I have questions on these too... If we go back and forth again and again, it is costly and time consuming operation.
On the otherhand, i twe kepp inside the memory, it may consume all memory and no space for the remaining objects.
In production, there might be chances that because of above reason, we may get lot of 'OutOfMemoryException', is not it?
How doe sit handles in realty. We are using DB2 type 2 driver.
When I try to move across result sets, what happens then?