View Full Version : Pre-generating the cube
11-25-2003, 03:41 AM
Since the data in our warehouse gets updated only once per day, I'd like to improve performance by pre-generating the cube. I've read about how to prevent Mondrian from accessing the database (setting memory usage very high). How would I get Mondrian to pre-generate views for my users?
Is it possible to use an HTML spider program to generate common views (via JPivot), thereby forcing Mondrian the cache them?
We've been using Powerplay for a few years now, and really like the ability to pre-generate the cube, rather than have it generated in real time.
Thanks very much!
05-07-2007, 07:13 AM
I have the same problem. I want to pre-generate a Cube each day but I don't find how I can force it.
Someone can help me?
Thanks a lot,
05-08-2007, 01:30 AM
Remember that Mondrian is not tied to the Cognos/Hyperion model of needing to explictly generate a cube database. If the Mondrian memory cache is cleared, the subsequent MDX queries will get the latest data from the underlying RDBMS cube database.
I have worked with a few customers where we had 2 or more Mondrian XML/A servers with a load balancer between them and the front end UI (say JPivot) servers, for uptime and performance reasons. When the cube database was updated, one of the Mondrian servers was taken offlinefrom the load balancer, the cache cleared, and then MDX run against the offline Mondrian server to refresh the cache. Then the offline Mondrian server was switched with the previously online server. This scheme allowed 24/7 uptime.
XML/A is key here. You can have a remote process running XML/A traffic against a server, which, in Mondrian's case, will fill the cache again.
The new cache clearing APIs in Mondrian 2.3 are worth investigating, too.
05-09-2007, 04:07 AM
Thanks a lot Sherman ;)
So If I understand, I have to use the mondrian.rolap.RolapSchema.clearCache() in a XML/A program?
Is it right?
05-09-2007, 07:31 AM
If new data comes into the cube database that you want to see, then Mondrian needs its cache cleared so that it knows to retrieve the required data. Prior to 2.3, you had to clear the whole cache across all accessed schemas, which will lead to a performance hit as Mondrian htis the database again as it processes queries.
The new cache clearing API could be leveraged to restrict the amount of data cleared from the cache. Caches for individual schemas can be cleared, and different clearing schemes can be inserted. Have a look at the DataSourceChangeListener interface and the example impelmentations. For example, there is a DataSourceChangeListener that forces Mondrian to never use the cache.