Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#5 Metadata performance patch for SSAS/XMLA

open
nobody
None
5
2015-04-19
2012-09-20
Steve
No

This patch relates to the metadata performance issues when using the XMLA driver to connect to SSAS as referred to in this bug:
https://sourceforge.net/tracker/?func=detail&aid=3531953&group_id=168953&atid=848534
and this forum post:
https://sourceforge.net/projects/olap4j/forums/forum/577988/topic/5299755

This is a pretty basic workaround and there are probably a lot of things I haven't thought about. I'd be interested in any feedback.

At this stage I have implemented it using a couple of system properties that can be used to turn on/off the new functionality, to make it easy to test. They are:

org.olap4j.driver.xmla.XmlaOlap4jCube.lazyLoadMeasures
When set to true, measures are not retrieved when the cube is loaded, but rather on the first time they are accessed.

org.olap4j.driver.xmla.XmlaOlap4jCellSet.lazyMemberLookup
When set to true, members that are not already cached in the metadataReader are not loaded immediately. I created a class XmlaOlap4jLazyMember which has some basic information about the member (uniqueName, caption), and when any further information about the member is requested it loads the member from the cube.

The idea with both of these is that it won't load as much metadata information from the cube unless it is needed by the client application. The lazyMemberLookup property means that all required members will be loaded individually, but that is what's happening anyway in any non-Mondrian data sources.

In my testing, the best case scenario (where none of the members' metadata needs to be retrieved) is a lot faster. The worst case scenario (where all of the members' metadata needs to be retrieved) is the same speed as the original code.

Perhaps you can suggest how to go about determining when to use this strategy - I don't know if it should be something that the client app can switch on/off, or if it should be done automatically based on the data source.

The patch is against the 1.0.1.500 release tree.

Discussion

  • Steve
    Steve
    2012-09-20

     
    Attachments
  • Steve
    Steve
    2012-09-20

    Note that so far my testing has been confined to SQL Server Analysis Services 2005.

     
  • Hello Steve, do you have the modified jar's. I'm having similar issues with a large Catalog/Cube, so I want to know if this could fix them.

    Best Regards