<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.emailstyle17
        {font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi <font color=navy><span style='color:navy'>All</span></font>,</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I&#8217;m not sure if I should communicate to you at this
email address. Please let me know a proper email address where it would get
most users&#8217; attention </span></font><font size=2 face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings'>J</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>I'm running the following
query (provided in a sample program with Mondrian distribution) against
Foodmart schema.<br>
<br>
<b><font color=blue><span style='color:blue;font-weight:bold'>SELECT
{[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON
0, {[Product].Children} ON 1 FROM [Sales]</span></font></b><br>
<br>
I set the trace on (using <b><span style='font-weight:bold'>System.setProperty(&quot;mondrian.trace.level&quot;,
&quot;1&quot;);</span></b>) and I can't see the aggregate table <b><font
color=blue><span style='color:blue;font-weight:bold'>agg_c_special_sales_fact_1997</span></font></b>
being used in any of the generated SQL query. I'm using Foodmart.xml
(distributed with mondrian) as catalog file.<br>
<br>
How do I make sure that a particular aggregate table is being used? I've
created the foodmart database schema in MySQL 5 using the <font color=blue><span
style='color:blue'>mondrian.test.loader.MondrianFoodMartLoader</span></font>
class and tested the MDX query.<br>
<br>
I executed the MDX query repeatedly (in a single execution of JVM), I found
that the first execution was ~1200 ms. However, subsequent executions (in the
same running JVM) were of the order of 5-10 ms, which is because of caching
done by Mondrian. Please let me know if I&#8217;m right. </span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>However, the first execution takes so much time and also from the SQL
queries generated in the trace seems to suggest that there is some problem and
the aggregate table is not being used.<br>
<br>
I&#8217;ve attached the java program which I&#8217;m using. Also, I&#8217;m
using the mondrian.jar available inside Olap4J jar distribution. When I tried
using mondrian.jar inside Mondrian distribution, I encountered following error:</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red;background:white'>Exception in thread &quot;Thread-0&quot;
java.lang.NoSuchMethodError: mondrian.olap.Query.setQueryTimeoutMillis(J)V</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
mondrian.olap4j.MondrianOlap4jCellSet.execute(</span></font><u><font size=2
color=navy face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy;background:white'>MondrianOlap4jCellSet.java:72</span></font></u><font
size=2 color=red face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:red;background:white'>)</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
mondrian.olap4j.MondrianOlap4jStatement.executeOlapQueryInternal(</span></font><u><font
size=2 color=navy face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:navy;background:white'>MondrianOlap4jStatement.java:288</span></font></u><font
size=2 color=red face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:red;background:white'>)</span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(</span></font><u><font
size=2 color=navy face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:navy;background:white'>MondrianOlap4jStatement.java:258</span></font></u><font
size=2 color=red face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:red;background:white'>)</span></font></p>

<p class=MsoNormal><font size=2 color=red face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:red;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at mondrian.OLAP4JTest$QueryPerfCheck.run(</span></font><u><font size=2
color=navy face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy;background:white'>OLAP4JTest.java:61</span></font></u><font size=2
color=red face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red;background:white'>)</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Please suggest me corrective actions.</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Thanks in advance.</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Regards,</span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Madhav</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>