Thanks for the background, Julian. We are using the Cache function explicitly in a set of queries that do some statistical calculations, where a part of the calculation has the potential to be repeated 10s of thousands of times, and we were curious why Cache function was not included in the log.<br>
<br><div class="gmail_quote">On Fri, Feb 5, 2010 at 2:13 PM, Julian Hyde <span dir="ltr"><<a href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<div><span><font color="#000080" size="2" face="Lucida Sans">I presume because Cache is introduced as a physical
optimization and the query has the same semantics if it is not
present.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">The planner introduces Cache in certain circumstances such as
directly under a Rank function. Maybe the planner is not smart enough to not
introduce it twice.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Because of these issues, I'd rather that these kind of
optimizations didn't modify the MDX parse tree at all. In other words, Cache
shouldn't be a function, it should be a Calc. But it is what it
is.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Julian</font></span></div><br>
<blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px">
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b> <a href="mailto:mondrian-bounces@pentaho.org" target="_blank">mondrian-bounces@pentaho.org</a>
[mailto:<a href="mailto:mondrian-bounces@pentaho.org" target="_blank">mondrian-bounces@pentaho.org</a>] <b>On Behalf Of </b>Matt
Campbell<br><b>Sent:</b> Thursday, February 04, 2010 12:25 PM<br><b>To:</b>
Mondrian developer mailing list<br><b>Subject:</b> [Mondrian]
CacheFunDef.unparse()<br></font><br></div><div class="im">
<div></div><br>CacheFunDef has an override for unparse which has the effect of
suppressing the function from the unparsed output. Does anyone know the
rationale for this behavior?<br><br></div></blockquote></div>
<br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></blockquote></div><br>