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=arch...@jab.org

Reply via email to