[jboss-user] [EJB 3.0] - Re: HQL/ JPA-QL Query Tuning: How to enforce the join order
hoeft
do-not-reply at jboss.com
Thu May 3 13:31:38 EDT 2007
Thank your for your answer.
But: Your are wrong, it is possible to enforce the join order in SQL. Dan Tow describes it in his book and I think his book wouldn't have got such a good resonance if he hadn't known what he was writting about.
Consider the following Sql-Statement:
| select *
| from Table1 T1, Table2 T2, Table3 T3
| where T1.Key2_ID=T2.Key2_ID
| and T1.Key3_ID = T3.Key3_ID;
|
If I want to enforce the join oder T1,T3,T2 this can be easily done:
| select *
| from Table1 T1, Table2 T2, Table3 T3
| where T1.Key3_ID = T3.Key3_ID
| and T1.Key2_ID + 0 * T3.Key3_ID =T2.Key2_ID;
|
So it is possible in SQL to enforce the join order I want.
Hoeft
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042924#4042924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042924
More information about the jboss-user
mailing list