Re: Q: optimizer does the wrong thing on join
Posted in 1996
In article <351.050296@deckard.hb.north.de>, ppr@deckard.hb.north.de (Patrick Preuss) says: > >Hi, > >we have a join with several tables, written with the most restricting table >stands at the top (the right thing, I guess). >What does the optimizer do? He just flips the order, and scans the biggest >table first, sequentially!!! Is this a problem for Update Statistics? Check the Informix FAQ, section 5.8. It says you can often trick the optimizer into starting where YOU want it to, by listing the relevant constraint three (yes, three) times. e.g., AND hamster.shoesize = 6 AND hamster.shoesize = 6 AND hamster.shoesize = 6 We tried it on our problem queries. It made a huge difference for us, so we coded it into the application then went outside to throw up. dwight