-->
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: Derived table joins
PostPosted: Sun Jan 28, 2007 6:52 am 
Beginner
Beginner

Joined: Wed Nov 01, 2006 5:33 pm
Posts: 22
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: NHibernate 1.2 beta 3

Name and version of the database you are using: MS SQL Server 2000

Hi,

Is it possible to use a derived table join to filter results in a query rather than have to use a WHERE IN (...) clause with a sub-query?

I need to return the max ID grouped by a foreign key and then only return those objects join fetched to others for my query.

There is a 54% : 46% performance ratio between a WHERE IN subquery compared to a joined derived table with the data I require.

Any help will be greatly appreciated


Top
 Profile  
 
 Post subject: This feature is useful for me too.
PostPosted: Thu Feb 22, 2007 3:46 pm 
Newbie

Joined: Mon Nov 06, 2006 12:39 pm
Posts: 5
I am wondering whether this is possible too, sure we can do it with pure SQL, but if it's possible with HQL, then that would be great. I am experiencing performance problem with subqueries(some db has real problem to optimize some subqueries, especially IN), derived table in HQL will greatly enhance the performance.


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.