Re: Efficiency of NULLIFie expression

2011-05-16 Thread Hal�sz S�ndor
2011/05/14 21:47 +0200, misiaq You're right about explain. That is why I suggested to use explain EXTENDED and then SHOW WARNINGS. Second query will show you the optimizer output. As far as I understand - that was the par of your question. Yes, I did that. That output showed no

Re: Efficiency of NULLIFie expression

2011-05-15 Thread Hal�sz S�ndor
2011/05/14 21:47 +0200, misiaq You're right about explain. That is why I suggested to use explain EXTENDED and then SHOW WARNINGS. Second query will show you the optimizer output. As far as I understand - that was the par of your question. Yes, I did that. -- MySQL General M

Re: Efficiency of NULLIFie expression

2011-05-14 Thread misiaq
h...@tbbs.net wrote: > 2011/05/12 15:15 +0200, misiaq > h...@tbbs.net wrote: > (...) > > > > Is the optimizer so clever as to set that test outside the expression, and > > only then evaluate it when "houmuch" and "SharePrice" are not equal? > > > > > > Try it yourself: > mysql > ex

Re: Efficiency of NULLIFie expression

2011-05-13 Thread Hal�sz S�ndor
2011/05/12 15:15 +0200, misiaq h...@tbbs.net wrote: (...) > > Is the optimizer so clever as to set that test outside the expression, and > only then evaluate it when "houmuch" and "SharePrice" are not equal? > > Try it yourself: mysql > explain extended select * from table1; and the

Re: Efficiency of NULLIFie expression

2011-05-12 Thread misiaq
h...@tbbs.net wrote: (...) > > Is the optimizer so clever as to set that test outside the expression, and > only then evaluate it when "houmuch" and "SharePrice" are not equal? > > Try it yourself: mysql > explain extended select * from table1; and then mysql > show warnings; You will see

Efficiency of NULLIFie expression

2011-05-12 Thread Hal�sz S�ndor
ADDDATE(ereStart, (SELECT hwyl FROM Stock) * NULLIF(Houmuch, (SELECT SharePrice FROM Stock)) / (SELECT regularPayment FROM Stock)) AS goodThrough Buried in the middle of the foregoing expression is a NULLIF, because of which the whole thing is NULL if "houmuch" and "SharePrice" are equal. Thus t