Thanks for the responses, Michael and John.<br><br>We had been thinking about both 1 and 2.&nbsp; Your right that maintaining different SQL generation strategies could be tricky, but the enhancement could have a huge impact.&nbsp; Our DBA says 3-5 times performance boost when using CUBE() over separate queries.
<br><br>We may be willing to take on the work, but we&#39;ll need help identifying an approach.<br><br>Michael, regarding the optimization you mentioned in the next release-- that would not help with distinct count measures, is that correct?&nbsp; What I&#39;ve been told is that at least some databases (Oracle, DB2) will correctly compute count distincts when using CUBE and ROLLUP.
<br><br>I also had a question about option (2):&nbsp; You mentioned that running two parallel queries won&#39;t work because trasaction context is mapped to the thread.&nbsp; If we&#39;re spawning separate threads for each query execution, wouldn&#39;t that get past the limitation?
<br><br><br><br><div><span class="gmail_quote">On 2/8/07, <b class="gmail_sendername">michael bienstein</b> &lt;<a href="mailto:mbienstein@yahoo.fr">mbienstein@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Yes, there has been thought about it.&nbsp; I&#39;m sure Julian can fill you in.&nbsp; 
<br><br>The main issues I see are:<br>1) Either you let the database do the parallelism, in which case you need to issue effectively multiple GROUP BYs in one SELECT (which is possible on some databases such as ORACLE and even MySQL with its ROLLUP option) and then disentangle the results,
<br>but this is not a standard in SQL.<br>2) Or you are really running two parallel queries in two separate connections (almost no JDBC driver will allow parallel queries.&nbsp; The JTS/JTA maps transaction context to thread and JDBC drivers must obey this).
<br>3) Or you have separate databases and have obviously different Connection objects open.<br><br>In the options
 (2) and (3) you need to revisit the way JDBC connections are handled by Mondrian.&nbsp; In option (1) you need to maintain different SQL generation strategies.&nbsp; All nice ideas but a lot of work.&nbsp; Yes I&#39;ve thought about it.&nbsp; But who can do it?&nbsp; Frustrating.
<br><br>Michael<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Message d&#39;origine ----<br>De : Matt Campbell &lt;<a href="mailto:mkambol@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mkambol@gmail.com</a>&gt;<br>À : Mondrian developer mailing list &lt;<a href="mailto:mondrian@pentaho.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mondrian@pentaho.org</a>&gt;<br>Envoyé le : Jeudi, 8 Février 2007, 23h12mn 38s
<br>Objet&nbsp;: [Mondrian] Multi-threading SQL execution<span class="q"><br><br><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><br>We&#39;ve been looking into ways to 
improve performance when running against large fact tables.&nbsp; One 
candidate we identified was to multi-thread SQL query execution.&nbsp; As things 
stand today, in Mondrian, SQL queries are executed sequentially.&nbsp; This means 
that if an MDX query involves 2 fact tables, and each fact table takes 5 seconds 
to query, that it takes Mondrian at least 10 seconds to get results.&nbsp; Running 
the two queries simultaneously would likely produce much better speed (of course 
dependent on the RDBMS capacity).&nbsp; </span></font>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Has anyone else considered 
multi-threading SQL execution? <br></span></font></p><br>
</span><div>_______________________________________________<br>Mondrian mailing list<br><a href="mailto:Mondrian@pentaho.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Mondrian@pentaho.org</a>
<br><a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br></div></div><span class="ad">
<br></span></div></div><span class="ad"><br>
                <hr size="1"> 
Découvrez une nouvelle façon d&#39;obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Yahoo! Questions/Réponses</a>.</span></div><br>_______________________________________________<br>Mondrian mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br><br></blockquote></div>
<br>