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.  [ 8 posts ] 
Author Message
 Post subject: setFetchSize Ignored
PostPosted: Mon Feb 14, 2005 12:29 pm 
Newbie

Joined: Fri Dec 03, 2004 4:41 pm
Posts: 15
Hibernate version:
2.1.7

Name and version of the database you are using:
Oracle 9


I'm using the createQuery and setFetchSize(10). I'm stilling getting over a thousand items for the call list(). Is there a reason for that?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 12:32 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Check the generated query, and if that does not help post more information (your code, for example)


Top
 Profile  
 
 Post subject: Generated
PostPosted: Mon Feb 14, 2005 12:34 pm 
Newbie

Joined: Fri Dec 03, 2004 4:41 pm
Posts: 15
There's nothing unusual in the generated sql. I would assume setFetchSize is a internal call to limit the size of the list. Is there anything I should be looking for?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 12:37 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
fetchSize is related to the result set filling strategy.
Use setMaxResult to limit your query.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 12:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Ah, I didn't read properly. Please read the API.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 12:45 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
michael wrote:
Ah, I didn't read properly. Please read the API.

ROTFL, I didn't read, please read ;-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 12:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
:-)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 2:33 pm 
Newbie

Joined: Fri Dec 03, 2004 4:41 pm
Posts: 15
Thanks, using setMaxResult now. Does setFetchSize even do anything in Oracle 9 flavor?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.