List:General Discussion« Previous MessageNext Message »
From:misiaq Date:May 14 2011 7:47pm
Subject:Re: Efficiency of NULLIFie expression
View as plain text  

hsv@stripped wrote:
> >>>> 2011/05/12 15:15 +0200, misiaq >>>>
> hsv@stripped 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 the optimized query.
> 
> http://dev.mysql.com/doc/refman/5.0/en/explain.html
> <<<<<<<<
> Not much of an explanation of "EXPLAIN"--and this command is mostly about indexing
> and joining, in SQL of course of immens importance, and, to be sure, finding "houmuch" in
> my query costs JOINing and SUMming, but I see nothing relevant to my question. On the
> other hand, maybe finding "houmuch" costs so much more than the rest of the expression
> that it does not matter.
> 
> In any case, there is here no answer to my question.
> 
> 

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.

Regards,
m
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