-->
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: How to make Hibernate quering given oracle partitions only?
PostPosted: Fri Mar 31, 2006 5:23 am 
Newbie

Joined: Fri Mar 31, 2006 4:38 am
Posts: 1
Hibernate version: 3

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

We have an application where users can log in and see some information about themselves. A part of the information is in a big table. The table is divided into many partitions according to "inserted" field. Each partition corespondes one month (BIGTABLEMMYY: BIGTABLE0106, BIGTABLE0206 and so on). At the time Hibernate makes a full scan of the table which is not necessary for the business logic and takes too much time. I would like to make Hibernate quering just the last few partitions to make it faster.
How can I achieve it?

The solution I suppose to have now is to use SQL instead of HQL and make the query like this:

select * from bigtable PARTITION (BIGTABLE0106) t union all select * from bigtable PARTITION (BIGTABLE0206)

Does anyone have any other solution?

Thanks.


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.