Table locking when using setFetchSize(Integer.MIN_VALUE)
Posted by: Martin Jericho
Date: February 02, 2005 09:05PM

I need to process queries containing millions of records in a Java application, and found the only way to do this without the JDBC driver storing the entire result in memory is by using the statement.setFetchSize(Integer.MIN_VALUE) feature mentioned in the documentation:

The documentation mentions a caveat that "any tables referenced by the query that created the streaming result will be locked until all of the results have been read or the connection closed".

I have experimented with this feature and have found that I can in fact add, delete and update rows in the table being accessed by the query while the query is still open, as long as I do it from a different connection. So what it the documentation talking about when it says the table is locked? Is the documentation wrong?

Thanks for any help on this.

Options: ReplyQuote

Written By
Table locking when using setFetchSize(Integer.MIN_VALUE)
February 02, 2005 09:05PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.