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
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to