-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How does setFetchSize(int size) work exactly?
PostPosted: Thu May 19, 2005 7:13 pm 
Newbie

Joined: Thu Sep 11, 2003 11:49 am
Posts: 8
Location: Albuquerque NM
When applied to a criteria.list() the list size returned is the size of the entire list (ie larger than the fetch size) but there are only as many items as the fetchSize specifies. Are all the elements returned to the jvm or does the database hand back only the elements to the list?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 20, 2005 1:44 am 
Newbie

Joined: Mon Apr 11, 2005 2:08 pm
Posts: 8
hibernate-javadoc of Query#setFetchSize:

Quote:
Set a fetch size for the underlying JDBC query




javadoc of java.sql.ResultSet#setFetchSize:
Quote:
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object. If the fetch size specified is zero, the JDBC driver ignores the value and is free to make its own best guess as to what the fetch size should be. The default value is set by the Statement object that created the result set. The fetch size may be changed at any time.


So it depends on the JDBC-Driver, how setFetchSize is handeled.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.