[Mondrian] Retrieving child members from cache

Luc Boudreau lucboudreau at gmail.com
Tue Oct 28 16:13:43 EDT 2014


This is a similar problem than what I'm facing while trying to optimize
ranges of members in the cache. We use a hash to represent entries, while
we should use something like a TreeSet. The TupleConstraints we have can
all be represented in terms of ranges (singletons are a range of 1).

I had looked into the RangeSet class from Guava, but it didn't fit. I
haven't had any spare time yet to look into Julian's proposal of using the
TreeSet, but am planning to do it soon. Let me know if you find something
useful before I do.

Luc

On Tue, Oct 28, 2014 at 3:36 PM, Matt Campbell <mcampbell at pentaho.com>
wrote:

>
>
> When a query like
>
>
>
>   SELECT Customer.[Name].members on 0 from [Sales]
>
>
>
> is executed, MemberCacheHelper will helpfully cache the set of members
> from the [Name] level.  Subsequent queries which require loading
> level.members can skip the SQL query and grab from cache.  Very good.
>
>
>
> If, however, the subsequent MDX is for specific members of that level, e.g.
>
>
>
>   SELECT {[Customer].[Customers].[USA].[OR].[Portland].[Jade Brandberry],
>
>           [Customer].[Customers].[USA].[OR].[Portland].[James Solano]} on
> 0 from [Sales]
>
>
>
> then each Customer member will be retrieved individually via separate SQL
> queries and cached, using the its corresponding ChildByNameConstraint in
> the key.
>
>
>
> Given that we have already loaded these members, intuitively it seems like
> we should be able to find them in the level member cache and avoid the
> redundant SQL queries.  Finding the members in cache, however, is
> complicated by the fact that caching uses the TupleConstraint as part of
> the key, so it’s not obvious which (if any) item in the cache might
> actually contain the referenced member.
>
>
>
> Have others thought about how we might improve member retrieval for
> enumerated sets?
>
>
>
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20141028/193d3d48/attachment.html 


More information about the Mondrian mailing list