Re: Set explain use
Posted in 1997
Danni Bauer wrote: } } satriguy@aol.com (SaTriGuy) wrote: } } >>Not considering indexes, does it make any difference to the informix } >>optimizer } >> if we switch the order of conditions in a where clause. For example, which } >>one } >> is better: } >> } >>select * from A where p = q and r = s or } >>select * from A where r = s and p = q . } >> } >>None of p,q,r, and s is indexed. } > } >Nope - not this this query. The optimizer will treat an "and" condition as an } > "equiviliant" and will consider both when creating the query plan. } >Madison Pruet } } It should not matter. But, a couple of years ago I found out that it } did! After all else failed, I just tried flipping them and BANG! my } performance problem was solved. I was using 5.0? I think. That sounds like the behavior of the 4.xx optimizer which was syntax based. I have a lengthy document, written by Tony DeCeccio, detailing how to help that bugger out by adjusting the order of join and filter conditions. I loved playing with that optimizer. Art S. Kagel