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 to write it is quite convenient--but if the optimizer is not clever enough, there will be wasted effort in propagating the NULL.
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?
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=listsearcharchive@lassosoft.com
May 12
misiaq Re: Efficiency of NULLIFie expression
May 12, 2011; 15:15
misiaq
Re: Efficiency of NULLIFie expression
May 13
Hal?sz S?ndor Re: Efficiency of NULLIFie expression
May 13, 2011; 19:31
Hal?sz S?ndor
Re: Efficiency of NULLIFie expression
May 14
misiaq Re: Efficiency of NULLIFie expression
May 14, 2011; 21:47
misiaq
Re: Efficiency of NULLIFie expression
May 15
Hal?sz S?ndor Re: Efficiency of NULLIFie expression
May 15, 2011; 01:03
Hal?sz S?ndor
Re: Efficiency of NULLIFie expression
May 16
Hal?sz S?ndor Re: Efficiency of NULLIFie expression
May 16, 2011; 14:08
Hal?sz S?ndor
Re: Efficiency of NULLIFie expression
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!