[Mondrian] Aggregate Tables and Supremely Dodgy SQL

Will Gorman wgorman at pentaho.com
Thu Feb 26 00:46:07 EST 2009

I've fixed a lot of aggregate table bugs in the trunk, which will be coming out soon in 3.1.   This issue may be fixed already.  Tom, could you try the latest snapshot of Mondrian and see if the problem goes away?


From: mondrian-bounces at pentaho.org on behalf of John V. Sichi
Sent: Thu 2/26/2009 12:34 AM
To: Mondrian developer mailing list
Subject: Re: [Mondrian] Aggregate Tables and Supremely Dodgy SQL

Tom Barber wrote:
> Is this a bug, my crappy schema design(its not real its just my tests), or something else?

Hmmm...the agg designer did not generate this:

<AggForeignKey factColumn="cust_code"
aggColumn="d_customers_Customer_Code" />

Instead it generated this:

<AggLevel column="d_customers_Customer_Code"
name="[Customer.Customers].[Customer Code]">

So the bug would appear to be that the agg rewrite at MDX query time is
deciding to join in the dimension table, but it has no foreign key
mapping available, so you end up with the big slow cartesian product,
which will also yield incorrect results--whereas the SQL didn't actually
need any join at all (it could just group by d_customers_Customer_Code).


Mondrian mailing list
Mondrian at pentaho.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4596 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20090225/149786df/attachment.bin 

More information about the Mondrian mailing list