Controlling Resul Set object to stop database process.
posted 10 years ago
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.