[Mondrian] Retrieving child members from cache

Matt Campbell mcampbell at pentaho.com
Tue Oct 28 15:36:56 EDT 2014


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?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20141028/8a0587c1/attachment.html 


More information about the Mondrian mailing list