[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Hibernate query not smart!
mimmo67
do-not-reply at jboss.com
Thu Feb 19 09:26:49 EST 2009
Hi all.
I have a query automatically generate by Hibernate derived from different classes often mapped on the same Oracle table.
The problem is that I obtain something like this:
select * from A action0_
left outer join
B action0_1_
on action0_.TRANS_ID=action0_1_.TRANS_ID
left outer join
C action0_2_
on action0_.TRANS_ID=action0_2_.TRANS_ID
left outer join
C action0_3_
on action0_.TRANS_ID=action0_3_.TRANS_ID
left outer join
C action0_4_
on action0_.TRANS_ID=action0_4_.TRANS_ID where
.........
The same table is outer joined 3 times. This drammatically reduce the query performance.
There is a way to indicate to Hibernate to generate better queries where different classes use the same Oracle tables or I have to work only on the mapping to avoid situation like this?
Thank you.
Best regards from Italy,
Domenico
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211486#4211486
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211486
More information about the jboss-user
mailing list