-->
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: Scrollable result sets and performance
PostPosted: Mon Jan 05, 2004 2:43 am 
Beginner
Beginner

Joined: Thu Aug 28, 2003 7:05 pm
Posts: 20
Hello,

After doing some general (Oracle) jdbc performance tests I noticed that the ResultSet.absolute() and ResultSet.relative are slow for large (50000 records) sets.

For example, to access record 50000 takes about 1437 ms, while record 50 takes 15 ms. This is particularly relevant for large lists and paging. There also seems to be a much higher memory usage when using absolute() and relative().

One way around this is to use a nested select:

select * from (
select query.*, rownum rnum from (
select c.* from code c order by code_type
) query where rownum <= :MAX_ROW )
where rnum >= :MIN_ROW order by rnum

See http://asktom.oracle.com/pls/ask/f?p=49 ... 7412348064

Does Hibernate support such paging? Is there a way to make it database indepenedent (via a dialect)? Do other JDBC drivers have the same performance? How would I build hibernate that uses this paging?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 5:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Yes Hibernate supports this and Yes it is controlled by the dialect. I suggest you try it out.


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.