Re: blocked resultSet.next()
Posted by: Mark Matthews
Date: February 12, 2010 12:46AM

Anthony,

Can you post a thread dump from your JVM when resultSet.next() is blocked? Do you happen to use the query cache?

You do realize that because of requirements in the JDBC specification about multiple open "cursors", the JDBC driver is spooling that very large result set into memory, while the mysql client is not? Your application may very well be hanging while the VM is trying to find more memory through garbage collection.

I'd suggest looking at processing rows in batches if your application needs multiple open cursors on the same connection, or if it can deal with one open result set per connection, calling setFetchSize(Integer.MIN_VALUE) on the statement, which will cause the driver to pull back rows as the application reads them and only keep one in memory at a time.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
February 11, 2010 11:40AM
Re: blocked resultSet.next()
February 12, 2010 12:46AM
February 12, 2010 09:52AM


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.