-->
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 convert following optimize MYSQL Query in HQL
PostPosted: Fri Dec 29, 2006 6:27 am 
Newbie

Joined: Fri Dec 29, 2006 4:56 am
Posts: 1
As i am new to the hibernate and have less knowledge about it ...
So if anyone here know how to write the following query in HQL ...


The MYSQL query :-

select p.id from Pages p use index (seq_number_one) where p.scene_id = :sceneid and p.seq_Number > 0 order by p.seq_Number ;

My Current working HQL Query is :-

select p.id from Pages p where p.scene.id = :sceneId and p.seqNumber > 0 order by p.seqNumber


Here i am trying to use the database index and guide the Database optimizer to use the following query...

Did Hibernate support Database indexes in HQL Queries...


Thank's in Advance...


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.