This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
suppose our JDBC result set object is retreving 10000 rows. Now certainly we got requirement that we need only 100 rows out of these 10000 rows, and we don't want to change the SQL.
So if we start iterating a result object and just after getting 100 records we break the loop and close the statement object and result set object. Is it going to stop the process at database server also. Some one says that process will keep on going on database side use excessive resources. We don't want to create another connection by closing the connection, because we need to start another database process after the iteration break of 100 rows.