[Mondrian] Heavy SqlMemberSource.getMemberChildren evaluation

Julian Hyde jhyde at pentaho.com
Thu Jun 4 07:42:18 EDT 2009


Due to MDX's relaxed name resolution semantics, Mondrian has to figure out
what names are at the first level of each dimension. For example, I can
write [F] to mean '[Gender].[F]', and not mention [Gender] anywhere in the
query. The same applies even if the dimension is degenerate. And yes,
getting the values of a degenerate dimension means scanning the fact table.

I suppose in theory mondrian could use an aggregate table to figure out the
values of the degenerate dimension, if an appropriate agg table existed. Can
someone please log a jira for that?

Also, try putting an index on the column for your degenerate dimension. It
should make that 'select ... Group by ... Order by' query work much faster.
(Although I suppose the database might want to use that index for other
queries, and that would be bad.)

It may - just may - be possible to avoid accessing the members of the first
level if every member in the query is fully-qualified.

Julian

> -----Original Message-----
> From: mondrian-bounces at pentaho.org 
> [mailto:mondrian-bounces at pentaho.org] On Behalf Of Peter Tran
> Sent: Tuesday, June 02, 2009 4:05 PM
> To: Mondrian developer mailing list
> Subject: RE: [Mondrian] Heavy 
> SqlMemberSource.getMemberChildren evaluation
> 
> Sherman,
> 
> It would do this per Mondrian instance right?  If you have 
> several JVMs with Mondrian running in each, it would do this 
> once per Mondrian JVM.
> 
> It's not necessarily cache, but even if it was it may get 
> aged out depending on the memory allocated for the JVM.
> 
> -Peter
> 
> -----Original Message-----
> From: mondrian-bounces at pentaho.org 
> [mailto:mondrian-bounces at pentaho.org] On Behalf Of Sherman Wood
> Sent: Tuesday, June 02, 2009 5:49 PM
> To: 'Mondrian developer mailing list'
> Subject: RE: [Mondrian] Heavy 
> SqlMemberSource.getMemberChildren evaluation
> 
> It is getting the values for the degenerate dimension. It 
> should only get this once.
> 
> Sherman
> 
> -----Original Message-----
> From: mondrian-bounces at pentaho.org 
> [mailto:mondrian-bounces at pentaho.org]
> On Behalf Of Pedro Alves
> Sent: Wednesday, June 03, 2009 5:00 AM
> To: Mondrian Mailing List
> Subject: [Mondrian] Heavy SqlMemberSource.getMemberChildren evaluation
> 
> 
> 
> Hello again.
> 
> 
> While implementing agg tables in my dashboards and trying to 
> make this over 5 billion rows queries light speed, I stumbled 
> upon a very weird thing
> 
> 
> Mondrian is doing the following query:
> 
>     2009-06-02 19:49:50,649 DEBUG [mondrian.rolap.RolapUtil]
>     SqlMemberSource.getMemberChildren: done executing sql [select
>         "blocklist_requests_by_day"."gecko_version" as "c0"
>     from
>         "blocklist_requests_by_day" as "blocklist_requests_by_day"
>     group by
>         "blocklist_requests_by_day"."gecko_version"
>     order by
>         "blocklist_requests_by_day"."gecko_version" ASC
>     ], exec+fetch 21993 ms, 425 rows
> 
> 
> This is a degenerated dimension, so it's kind'a expected; but 
> the thing is that I'm not using this dimension in *any* query 
> I'm doing.
> 
> 
> Any idea why mondrian is doing this?
> 
> 
> Thanks
> 
> 
> 
> --
> Pedro Alves
> pmgalves-at-gmail.com
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
> 
> 
> 





More information about the Mondrian mailing list