title: Out of memory when doing a big query?
body: <p>I received this error when trying to do big query.</p>
  
  <pre><code>java.lang.OutOfMemoryError: Java heap space
  </code></pre>
  
  <p>I've searched and found that applying <strong>setAutoCommit(false)</strong> and <strong>setFetchSize</strong> methods to my prepared statement might help handling big query.
  However, when I used it, I received this error.</p>
  
  <pre><code>java.sql.SQLException: Illegal value for setFetchDirection().
  </code></pre>
  
  <p>What is the proper and easy way to handle large query?</p>
  
  <p>What is the proper way to use setFetchSize?</p>