<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6001.17052" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2>Matt,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2>That rationale is useful - thanks.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2>Did you try against Teradata? I am a little hazy on what 
combinations of grouping sets/distinct-count/AJIs they support, but it's 
possible that distinct-count + grouping sets may prevent usage of an AJI, and 
that would be unfortunate because AJIs give a big boost to 
performance.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2>You didn't answer my 2nd question: <SPAN><FONT face=Verdana 
color=#000080 size=2>Would this work with distinct-count measures applied to 
aggregate members? (For example unit sales over [CA plus 
OR].)</FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2><SPAN></SPAN></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=792582304-25012008><FONT face=Verdana 
color=#000080 size=2><SPAN>Julian</SPAN></FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> mondrian-bounces@pentaho.org 
  [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Matt 
  Campbell<BR><B>Sent:</B> Thursday, January 24, 2008 7:38 AM<BR><B>To:</B> 
  jhyde@pentaho.org; Mondrian developer mailing list<BR><B>Subject:</B> Re: 
  [Mondrian] Adding Grouping Set support for Distinct Count 
  measures<BR></FONT><BR></DIV>
  <DIV></DIV>We're interested in this change not so much for performance 
  (although we have seen some cases where it seems to improve performance) but 
  because:<BR><BR>1) It will allow correct totaling in cases where a dimension 
  table does not join to every fact table row.&nbsp; We can get over-counting in 
  these cases because the total query is fired separately without joining to the 
  dimension table.&nbsp; I know in general dimension rows should be 
  all-inclusive, ie have a member value for each fact table row.&nbsp; We have 
  some good reasons for violating this rule, though. <BR><BR>2) It will also 
  bring greater consistency to how count distinct and summable measures are 
  evaluated.<BR><BR><BR><BR>
  <DIV class=gmail_quote>On Jan 22, 2008 7:52 PM, Julian Hyde &lt;<A 
  href="mailto:jhyde@pentaho.org"> jhyde@pentaho.org</A>&gt; wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV>
    <DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#000080 size=2>No 
    objections in principle. Have you hand-generated such queries to see whether 
    they are any improvement? It is possible that the queries do not yield any 
    performance improvement, because distinct-count is difficult for a database 
    to evaluate and therefore it might be difficult for the DBMS to find 
    commonality between the different grouping sets.</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#000080 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#000080 size=2>Would 
    this work with distinct-count measures applied to aggregate members? (For 
    example unit sales over [CA plus OR].)</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#000080 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN><FONT face=Verdana color=#000080 
    size=2>Julian</FONT></SPAN></DIV><BR>
    <BLOCKQUOTE 
    style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,128) 2px solid; MARGIN-RIGHT: 0px">
      <DIV lang=en-us dir=ltr align=left>
      <HR>
      <FONT face=Tahoma size=2><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>Ajit 
      Vasudeo Joglekar<BR><B>Sent:</B> Tuesday, January 22, 2008 9:33 
      AM<BR><B>To:</B> <A href="mailto:mondrian@pentaho.org" 
      target=_blank>mondrian@pentaho.org</A><BR><B>Subject:</B> [Mondrian] 
      Adding Grouping Set support for Distinct Count 
      measures<BR></FONT><BR></DIV>
      <DIV>
      <DIV></DIV>
      <DIV class=Wj3C7c>
      <DIV></DIV><BR><FONT face=sans-serif size=2>We would like to introduce 
      grouping sets support for distinct count measures in mondrian. We have 
      analyzed this and it is a small change. Most of the work is around 
      changing and adding test cases.</FONT> <BR><BR><FONT face=sans-serif 
      size=2>It will be great if we can make this a part of the upcoming 
      release. Requesting comments</FONT> <BR><BR><FONT face=sans-serif 
      size=2>Thanks</FONT> <BR><BR><FONT face=sans-serif size=2>-Ajit</FONT> 
      <BR><BR></DIV></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></BLOCKQUOTE></BODY></HTML>