Re: Table locking when using setFetchSize(Integer.MIN_VALUE)
Posted by: Mark Matthews
Date: February 02, 2005 10:27PM

Martin Jericho wrote:
> 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:
> ntation-notes.html
> 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.

This is true for MyISAM tables in most cases. Are you using MyISAM or InnoDB tables?


Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools

Options: ReplyQuote

Written By
Re: Table locking when using setFetchSize(Integer.MIN_VALUE)
February 02, 2005 10:27PM

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.