[Mondrian] Native Dimension Filter

Rushan rushan.chen at gmail.com
Thu Apr 16 21:51:31 EDT 2009


We have come across many reports here at LucidEra where the customer 
always wants to exclude a few "exception" dimension values. The MDX 
either enumerates all the desired values, or use a NOT IN filter such as 
the one below:

  Filter([Product].[Product Family].Members,[Product].CurrentMember Not In {[Product].[All Products].[Drink]})

Currently, this filter is not translated to SQL when Mondrian loads the 
Product Family members. I did some experiment and found that if they 
were natively evaluated, and especially if the members excluded are from 
the lowest levels of a deep hierarchy, evaluating the filter natively 
can help quite a bit with the MDX query performance.

I did some prototyping and sketched out the design here:

http://pub.eigenbase.org/wiki/MondrianNativeFilterImprovement

Note that the only dimension filter considered at this point is In/Not 
In. There are other candidates such as Matches/Not Matches filter. I 
punted on this one because DBs have different levels of SQL regexp 
support. Some are buggy such as LucidDB.

Please take a look and let me know if you have any questions with the 
overall idea. Also, if you have use cases of other dimension filters 
that fit in the constraints listed in the wiki, it will be good to see 
if they could be made native by using a similar approach.

Rushan




More information about the Mondrian mailing list