-->
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.  [ 3 posts ] 
Author Message
 Post subject: setFirstResult argument is too small, don't everybody think?
PostPosted: Sat Apr 07, 2007 2:42 am 
Beginner
Beginner

Joined: Fri Jan 27, 2006 4:20 am
Posts: 22
Hey, I need to pass a huge value to setFirstResult, probably 5 billion or more. They should overload that function to include a long type argument.. who's with me?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 07, 2007 3:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Yes and No.

Yes - semantically I would agree a long is better. This is also supported by the recent (correct) change to the return type for the ' count(*)' select clause in HQL.

No - as paging implementations by DBs often becomes less efficient as the starting point increases. If your paging starts-at/get-to-the 5 billion'th record then maybe an alternative should be used.

I would suggest you create a JIRA entry and see if it flys.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 11:51 pm 
Beginner
Beginner

Joined: Fri Jan 27, 2006 4:20 am
Posts: 22
Code:
No - as paging implementations by DBs often becomes less efficient as the starting point increases. If your paging starts-at/get-to-the 5 billion'th record then maybe an alternative should be used.


Is that really sufficient reason to set a limitation? Can we make it a bit forgiving? Why don't let the user suffer the consequences? What if a RDMS optimally implements paging?

I'm new to this community, I don't know if it is appropriate for me to add entries to JIRA.


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