SET CACHE

The calculation cache is a buffer (temporary storage memory) that Essbase uses to create and locate blocks of data during calculation. Using this cache, the calculation finds existing blocks faster than if it had to go to disk, especially when the database is being calculated for the first time or when the data is sparse, which can significantly improve calculation times.

This calculation cache is used by Essbase to determine when it is necessary to create a parent block and which child blocks are necessary to calculate this parent block, without having to go to disk.

The size of the calculation cache (as well as the «index cache», «data file cache» and «data cache») impacts more when the calculations are based more on aggregations than on calculation formulas.

1.- Structure of the calculation cache

Essbase classifies sparse dimensions into «bitmap dimension» and «anchor dimension»:

To know which are the bitmap dimensions and which are the anchor dimensions, use the SET MSG DETAIL instruction.

Essbase can use a single bitmap or multiple bitmaps:

Features of these options:

A single bitmap:

In short, 3 possible situations, which ordered from highest to lowest level of efficiency are:

Of these three options, Essbase will select the one that is most optimal for the calculation, a selection that will depend on the size that we have assigned to the calculation cache.

2.- Size of the calculation cache

The size of the calculation cache is calculated:

Let’s see an example:

Suppose 4 spare dimensions

Option 1: A single anchor dimension and multiple bitmap dimensions:

The dimensions «Dim1», «Dim2» and «Dim3» are bitmap dimensions.

The dimension «Dim4» is the anchor dimension; the maximum number of dependent parents is 3.

Option 2: A single anchor dimension and a single bitmap:

The dimensions «Dim1», «Dim2» and «Dim3» are bitmap dimensions.

The dimension «Dim4» is the anchor dimension.

Option 3: Multiple anchor dimensions and a single bitmap:

The dimensions «Dim1», «Dim2» are bitmap dimensions.

Dimensions «Dim3» and «Dim4» are anchor dimensions.

Depending on the size of the calculation cache, Essbase will select one option or another, always looking for the most efficient one:

To find out the cache option that Essbase applies in a calculation, you can include the SET MSG SUMMARY command in the calculation script.

3.- Using the SET CACHE command

Essbase uses the calculation cache whenever:

Essbase offers three levels of cache for calculation.

The size of the cache corresponding to each of these levels is defined in the file «essbase.cfg.file» on the server where it can be modified.

To change the cache level to be applied in the calculation, use the command:

In the log you can see the level of cache applied in the calculation by means of the command «SET MSG».

Through trials, it is possible to estimate the optimal size of the calculation cache.

This command also offers other possible parameters:

With the parameter “OFF” Essbase does not use the calculation cache (by default Essbase applies the calculation cache.

With the parameter “ALL” Essbase uses the calculation cache even when it does not calculate at least one full sparse dimension.

This SET CACHE command can be used more than once in a calculation script; at each moment it will apply the last one that it has read in the script.

Español

El caché de cálculo es un buffer (memoria de almacenamiento temporal) que Essbase utiliza para crear y localizar los bloques de datos durante el cálculo. Al utilizar este caché el cálculo localiza más rápidamente los bloques existentes que si tiene que acudir al disco, especialmente cuando la base de datos se calcula por primera vez o cuando los datos están dispersos, lo que puede mejorar significativamente los tiempos de cálculo.

Este caché de cálculo lo utiliza Essbase para determinar cuándo es necesario crear un block padre y qué bloques hijos son necesarios para calcular este bloque padre, sin tener que acudir al disco.

El tamaño del caché de cálculo (así como el “index cache”, “data file cache” y “data cache”) impacta más cuando los cálculos están basados más en agregaciones que en fórmulas de cálculo.

1.- Estructura del caché de cálculo

Essbase clasifica las dimensiones dispersas en “dimensión bitmap” y “dimensión de anclaje”:

Para conocer cuáles son las dimensiones bitmaps y cuales las de anclaje se utiliza la instrucción SET MSG DETAIL.

Essbase puede utilizar un único bitmap o múltiples bitmaps:

Características de estas opciones:

Un único bitmap:

En definitiva se pueden plantear 3 situaciones, que ordenadas de mayor a menos nivel de eficiencia son:

De estas tres opciones Essbase seleccionará en cada momento la que resulte más óptima para el cálculo, selección que va a depender del tamaño que le hayamos asignado al caché de cálculo.

2.- Tamaño del caché de cálculo

El tamaño del cache de cálculo se calcula:

Veamos un ejemplo:

Supongamos 4 dimensiones dispersas

Opción 1: Una única dimensión de anclaje y múltiples dimensiones bitmaps:

Las dimensiones “Dim1”, “Dim2” y “Dim3” son dimensiones bitmaps.

La dimensión “Dim4” es dimensión anclaje; el número máximo de padres dependientes es de 3.

Opción 2: Una única dimensión de anclaje y un único bitmap:

Las dimensiones “Dim1”, “Dim2” y “Dim3” son dimensiones bitmaps.

La dimensión “Dim4” es dimensión anclaje.

Opción 3: Múltiples dimensiones de anclaje y un único bitmap:

Las dimensiones “Dim1”, “Dim2” son dimensiones bitmaps.

Las dimensiones “Dim3” y “Dim4” son dimensiones de anclaje.

Dependiendo del tamaño del cache de cálculo Essbase seleccionara una opción u otra, siempre buscando la más eficiente:

Para conocer la opción de cache que aplica Essbase en un cálculo se puede incluir el comando SET MSG SUMMARY en el script de cálculo.

3.- Uso del comando SET CACHE

Essbase utiliza el caché del cálculo siempre que:

Essbase ofrece tres niveles de cache para el cálculo.

El tamaño del cache que corresponde a cada uno de estos niveles viene definido en el fichero “essbase.cfg.file” del servidor donde se puede modificar.

Para cambiar el nivel de caché que se quiere aplicar en el cálculo se utiliza el comando:

En el log se puede ver el nivel de caché aplicado en el cálculo mediante el comando “SET MSG”.

A través de ensayos se puede estimar cual es el tamaño óptimo del caché de cálculo.

Este comando también ofrece otros posibles parámetros:

Con el parámetro “OFF” Essbase no utiliza el caché del cálculo (por defecto Essbase si aplica el caché del cálculo.

Con el parámetro “ALL” Essbase utiliza el caché del cálculo incluso cuando no calcula al menos una dimensión dispersa completa.

Este comando SET CACHE se puede utilizar más de una vez en un script de cálculo; en cada momento aplicará el último que haya leído en el script.