title: What is the maximum recognized fetch size for a ResultSet
body: <p>As the title states, what is the maximum size recognized by the Java <code>ResultSet</code> object?  Specifically the <a href="http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#setFetchSize%28int%29" rel="nofollow">setFetchSize</a> function.  </p>
  
  <pre><code>ResultSet results...;
  results.setFetchSize(HUGE_VALUE);
  </code></pre>
  
  <p>More to the point, if there is no "maximum" what is the limiting factor in the size of the fetch?</p>
  
  <p><strong>COMMENT</strong></p>
  
  <blockquote>
    <p>int is datatype, so I guess it would accept till MAX_INT, remaining
    things are driver implementation dependent.</p>
  </blockquote>
  
  <p>Be that as it may that has very little to do with my question, I asked what is recognized not what I can pass to it.  While it may sound like splitting hairs, that is the nature of this question.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Since this seems to be getting some "not a real question" close votes.  This is specifically for the Oracle JDBC drivers, <code>ojdbc14</code>.  As someone has posted below, I am pulling back result sets in the hundreds of millions, so 30 or 200 is nowhere near the right answer for correct fetch size based on my tests.  At the moment my fetch size is <code>10,000,000</code> but there is no way for me to validate that the database is using the size of 10 million.  Further I understand how database hints work, and more often than not you can make the database use the hint you supply, in my experience.</p>