Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
Interpretation order |
Sat, Jul 27 2013 10:17 AM | Permanent Link |
Roy Lambert NLH Associates 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 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. 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 ? 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 PM | Permanent Link |
Roy Lambert NLH Associates 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 |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |