Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Interpretation order
Sat, Jul 27 2013 10:17 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

As part of my query generator rewrite I added in a NOT column since I had cludged it into the previous incarnation due to a need to flip some multiple tests and I had a sudden thought - should I get rid of the not tests eg replace

field not like '%ccc%'

with

not field like '%ccc%'

then I realised I wasn't sure how ElevateDB (or SQL really) handled things like AND and OR. I found one post which referred to left to right execution and tried some tests but I'm still not sure. It looks as though each field/test/criteria is executed independently unless there are brackets, but I wonder if I just haven't come up with the right pattern to blow that out of the water yet. If one exists I guarantee a user will find and use it.

Sorry if this has been asked before of if (as I feel) I'm being unduly thick.


Roy Lambert
Mon, Jul 29 2013 1:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< then I realised I wasn't sure how ElevateDB (or SQL really) handled
things like AND and OR. I found one post which referred to left to right
execution and tried some tests but I'm still not sure. It looks as though
each field/test/criteria is executed independently unless there are
brackets, but I wonder if I just haven't come up with the right pattern to
blow that out of the water yet. If one exists I guarantee a user will find
and use it.

Sorry if this has been asked before of if (as I feel) I'm being unduly
thick. >>

Is there a question in there ? Wink Is the question just "how does EDB
handle AND and OR conditions" ?  If so, then the answer is way too
complicated for a single forum post because it depends on a *lot* of
factors.   In general, a lot depends upon whether the condition is
optimizable and whether it refers to a table that is the target of a LOJ,
but there are other factors, such as how the conditions are grouped (what
you point out) and whether another condition is more selective than the
current condition, and how much I/O is estimated for the condition.

Tim Young
Elevate Software
www.elevatesoft.com


Mon, Jul 29 2013 1:53 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Yes there was a question, and you guessed it and answered it well enough for me to make a decision.

Thanks

Roy Lambert
Image