I got this error while trying to make a big request.
java.lang.OutOfMemoryError: Java heap space
I searched and found that using the setAutoCommit (false) and setFetchSize methods for my prepared statement can help handle a large request. However, when I used it, I got this error.
java.sql.SQLException: Illegal value for setFetchDirection().
What is the correct and easy way to handle a large request?
What is the correct way to use setFetchSize?
source share