Re: [GENERAL] Shortcut evaluation in OR or IN

2013-05-07 Thread Tim Uckun
Thanks for the explanation. On Mon, May 6, 2013 at 8:43 PM, Jasen Betts wrote: > On 2013-05-06, Tim Uckun wrote: > > --047d7b2e4ea07402b004dc034a3b > > Content-Type: text/plain; charset=UTF-8 > > > > Say I have a select like this. > > > > SELECT * FROM table where field = X OR field = Y limit

Re: [GENERAL] Shortcut evaluation in OR or IN

2013-05-06 Thread Jasen Betts
On 2013-05-06, Tim Uckun wrote: > --047d7b2e4ea07402b004dc034a3b > Content-Type: text/plain; charset=UTF-8 > > Say I have a select like this. > > SELECT * FROM table where field = X OR field = Y limit 1 > > And I have two records one that matches X and one that matches Y will I > always get X beca

Re: [GENERAL] Shortcut evaluation in OR or IN

2013-05-06 Thread Richard Poole
On Mon, May 06, 2013 at 02:16:38PM +1200, Tim Uckun wrote: > Say I have a select like this. > > SELECT * FROM table where field = X OR field = Y limit 1 > > And I have two records one that matches X and one that matches Y will I > always get X because the evaluation will stop after the first clau

[GENERAL] Shortcut evaluation in OR or IN

2013-05-05 Thread Tim Uckun
Say I have a select like this. SELECT * FROM table where field = X OR field = Y limit 1 And I have two records one that matches X and one that matches Y will I always get X because the evaluation will stop after the first clause in the OR matches? What about for IN (X, Y) how about if I am doin