List:General Discussion« Previous MessageNext Message »
From:(Hal Date:May 12 2011 1:23am
Subject:Efficiency of NULLIFie expression
View as plain text  
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?

Thread
Efficiency of NULLIFie expressionhsv12 May
Re: Efficiency of NULLIFie expressionmisiaq12 May
  • Re: Efficiency of NULLIFie expressionhsv14 May
Re: Efficiency of NULLIFie expressionmisiaq14 May
  • Re: Efficiency of NULLIFie expressionhsv15 May
Re: Efficiency of NULLIFie expressionhsv17 May