[jboss-user] [EJB 3.0] - Re: HQL/ JPA-QL Query Tuning: How to enforce the join order
fhh
do-not-reply at jboss.com
Fri May 4 04:38:27 EDT 2007
Yeah, but this is what proper statistics are good for. The "solution" is just a nasty hack.
If the query optimizer chooses an obviously wrong join order than something is wrong with the statistics. The proper way is to fix those.
Three reasons suddenly come to my mind why using this "hack" is wrong:
1.) You have to modify every single query in your application.
2.) The queries become less readable. Your code will be less maintainable.
3.) The behaviour is unpredictable. New useful indxes might not be used; the query optimizer might realize in later versions that multiplying with 0 is always 0...
Don't cure the symptoms. Fix the problem.
Regards
Felix
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043090#4043090
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043090
More information about the jboss-user
mailing list