Cube value cache

When OLAP calculates cell values through consolidation or rule evaluation, the results are stored in a cache.

Subsequent queries for the same cells retrieve the values from the cache instead of recalculating them. This approach improves performance, especially for complex rules and large consolidations.

How cube value cache works

The cube value cache consists of these two components:

  • Value cache: Stores calculated cell values together with their coordinates. When a cell calculation produces a result, the value is stored in the cache. Cells with empty results are not stored, because most areas of a cube are typically sparse.
  • Subcube cache: Records which areas of the cube have already been calculated. Each area is defined by the combination of dimension elements included in the query. When a new query is submitted, OLAP checks the subcube cache to determine which parts of the requested area have already been calculated and which parts still require calculation.

When a query is processed, OLAP intersects the requested area with the areas recorded in the subcube cache. For areas already calculated, values are retrieved from the value cache. If a cell within a cached area has no value in the value cache, it is considered empty. Any remaining areas that are not covered by the subcube cache are calculated by the kernel.

Cache invalidation

When a cell value is created, modified, or deleted, any cached values that depend on that change are invalidated. If cache partitioning is configured, only the affected partitions are invalidated instead of the entire cache.

Dependencies between cubes are also tracked. If a rule in one cube references values from another cube, a change in the source cube invalidates the dependent cache entries in the target cube.

For more information about cache partitioning, see the "Cache Partitioning" topic in Editing OLAP Databases .

Viewing cache information

OLAP Database administrators can retrieve the current status of the cache through the Database.GetCacheInfo XML API request.

For more details, see the Database GetCacheInfo topic in OLAP SDK.

Diagnostic command

Retrieving the current status of the cache through cache-info diagnostic command is available only to farm administrators.

To run the diagnostic command proceed with these steps:

  1. Select Dashboards > Farm Administration > Services.
  2. Select the OLAP database service.
  3. Run the cache-info command.

The output shows, for each cube, the number of subcubes, the number of cells within those subcubes, and the number of cached values.

Example of three subcubes calculated for the ANALYSIS cube

==================================================
Cube name                  : ANALYSIS
Count of subcubes          : 3
Count of cells in subcubes : 87966
Count of cached values     : 8328

Three areas (subcubes) have been calculated for the ANALYSIS cube, covering 87,966 cells in total. Of those, 8,328 cells had non-empty values and are stored in the value cache.

Example of a cube with no cached data

==================================================
Cube name                  : #_TABACC
Count of subcubes          : 0
Count of cells in subcubes : 0
Count of cached values     : 0

A cube with no cached data shows all counts as zero

Example of value cache that contains entries while the subcube count is zero

==================================================
Cube name                  : BS_INPUT
Count of subcubes          : 0
Count of cells in subcubes : 0
Count of cached values     : 537600

This situation may occur when rule calculations are evaluated individually per cell rather than as a batch over an area. In this case, each result is stored in the value cache, but no subcube area is registered. This is expected behavior and doesn't indicate a problem.