-->
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.  [ 1 post ] 
Author Message
 Post subject: No paging support when querying or using hql with sybase
PostPosted: Sun Dec 16, 2007 5:18 am 
Newbie

Joined: Sun Dec 16, 2007 4:11 am
Posts: 1
Hibernate version: 3.1

Mapping documents: N/A

Code between sessionFactory.openSession() and session.close():

criteria = /*creating criteria */
...
criteria.setFirstResult(1);
criteria.setMaxResults(50)
...


Full stack trace of any exception that occurs: N/A

Name and version of the database you are using: Sybase SQL anywhere 10.0.2

The generated SQL (show_sql=true): N/A

Debug level Hibernate log excerpt: N/A


Although hibernate API allow paging support the above API , and this API functioning : I.e. returning the page size results only , Hibernate loads all the data from Sybase since Sybase and its hibernate dialects declares that not supporting SQL 'limit' function.

My Issues are:
1. Why hibernate loads and creates POJOs although the page size is set?
If it will return only the page size , why Hibernate builds all the results set objects?
I've monitored the performance through a performance tunning tool , and I've seen that the POJOs number that were created and populated was as the size of the criteria result size and not as the page size.

2. Will hibernate allow other support than SQL limit function for paging.
Sybase allow pagination through temporary tables:
http://forum.softpedia.com/index.php?showtopic=150162

I've implemented this outside of hibernate using hibernate code but it's of course a hack and not a long term solution.

I would suggest to add a Hook to implement it in a hibernate low level code calling the dialect / or other query callback before calling the JDBC layer.
Maybe there is such a callback out there?

Thanks,
Yossi


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

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.