title: What and when should I specify setFetchSize()?
body: <p>I see a lot of "best practices" guides for JDBC/MySQL that tells me to specify setFetchSize().</p>
  
  <p>However, I have no idea when to specify, and what(statement, result set) to specify.</p>
  
  <pre><code>Statement.setFetchSize() or PreparedStatement.setFetchSize() 
  ResultSet.setFetchSize()
  </code></pre>
  
  <ol>
  <li>Of these two, what should I specify?</li>
  <li>From <a href="http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html#setFetchSize%28int%29">javadoc</a> and <a href="http://docs.oracle.com/cd/E11882_01/java.112/e16548/resltset.htm#JJDBC28621">oracle documentation</a>, this is where I get confused about "when"</li>
  </ol>
  
  <p>Javadoc</p>
  
  <blockquote>
    <p>The default value is set by the Statement object that created the result set. The fetch size may be changed at any time.</p>
  </blockquote>
  
  <p>Oracle Doc</p>
  
  <blockquote>
    <p>Changes made to the fetch size of a statement object after a result set is produced will have no affect on that result set.</p>
  </blockquote>
  
  <p>Please correct me if I am wrong. Does this mean that setFetchSize is only Affective before a query is executed?(Therefore, setFetchSize on a ResultSet is useless? But happens to "The fetch size may be changed at any time"?)</p>