SAP ABAP Data Element RSRCACHEMODE (Cache Mode)
Hierarchy
SAP_BW (Software Component) SAP Business Warehouse
   BW-WHM-DBA (Application Component) Data Basis
     RSR_CORE (Package) Processor for Core Objects Reporting
Basic Data
Data Element RSRCACHEMODE
Short Description Cache Mode  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type RSRCACHEMODE    
Data Type CHAR   Character String 
Length 1    
Decimal Places 0    
Output Length 1    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Cache Mode 
Medium 15 Cache Mode 
Long 20 Cache Mode 
Heading  
Documentation

Definition

The cache mode defines whether and how the query results and navigational states calculated by the OLAP processor should be saved as highly compressed data in a cache. You can define the respective mode for an InfoProvider as the standard value in Customizing and for a query in the Query Monitor.

Use

Caching is a means of improving query performance. However, you should make sure that the benefits balance the costs:

Benefits: Caching improves the response time for queries

Costs: Expenditure involved in organizing and retaining data in the cache

You can keep the cache data in main memory, on an application server, or distributed in a network. The option that you choose depends on various parameters.

These include:

Frequency of Query Requests

We recommend that you save queries that are requested very frequently in the cache. Main memory cache is very fast, but limited in size. By displacing cached data, you can cancel out main memory limitations, but this also affects system performance. There are practically no limitations on the memory space available in the database or in the file system for the persistent cache. Accessing compressed data directly in the persistent cache also improves performance.

Complexity of Query

Caching improves performance for queries whose evaluation is more complex. We recommend that you keep complex data processed by the OLAP processor in the cache. (Therefore the cache mode Main Memory Without Swapping is less suitable for such queries)

Data Loading Frequency

The cache does not provide an advantage if query-relevant data is frequently changed and therefore has to be loaded frequently, since the cache has to be regenerated every time. If cached data is kept in main memory, data from queries that are called frequently can be displaced, so that calling the data takes more time.

Structure

The following modes are supported for the global cache:

  1. Cache is Inactive (0)

The cross-transactional cache is deactivated.

The following modes are possible for the active cache: The cross-transactional cache is activated.

  1. Main Memory Cache Without Swapping (1)

The cache data is stored in main memory. When the memory allocated for caching has been used up, the excess data is removed, that is, deleted from the memory (in accordance with the algorithm). If a query is requested again, the result needs to be read from the InfoProvider again.

  1. Main Memory Cache With Swapping (2)

The cache data is stored in main memory. When the cache memory is used up, the excess data is written to a background store, and can be loaded into the cache memory again when making another request. The background store can no longer be used once query-relevant data has been loaded again.

  1. Persistent Cache per Application Server (3)

The cache data is stored persistently as a database table or as a file in a directory that can be accessed from the application server. We recommend that you select a directory that is near to the application server.

Saving the cache data in a database table puts a heavy load on the database, but accessing cached data in the database is also significantly faster. In comparison to storing data in, for example, a star schema (see InfoCube), fewer tables are read and fewer indexes are accessed.

  1. Cross-Application Server Persistent Cache (4)

The cache data is stored persistently as a database table or as a file in a network file system that can be accessed by all application servers. In this mode, data is not displaced and the memory size is not limited. More space is required, but this method also saves time.

Database table: The database instance for the table carries the load.

File: The operating system of the network node for the file carries the load.

With both storage types, the application server that calculates the data and network communication have to be taken into account.

  1. BLOB/Cluster Enhanced (5)

The cache data is persistent in database tables. In this mode, data is not displaced and the memory size is not limited. More space is required, but this method also saves time.

Database table: The database instance for the table carries the load.

With both storage types, the application server that calculates the data and network communication have to be taken into account.

The way in which data is processed and saved has fundamentally changed in this cache mode compared to the cache modes specified above. No lock concept is used, and there is no central directory of cache elements.

Cache mode BLOB/Cluster Enhanced is not available in the default setting. To be able to use this cache mode, you need to activate RSADMIN parameter RSR_CACHE_ACTIVATE_NEW (VALUE=x).

You can find about more by reading SAP Note 1026944.

For the active cache modes listed under 3-6 (Main Memory Cache with Swapping, Persistent Cache per Application Server, and Cross-Application Server), you can define how the displaced or cached data is to be stored. You can select the following persistence modes:

1.    Inactive: If you select this option, the system resets the cache mode to Main Memory Cache Without Swapping (1).

2.    Flat file: Storage in a file.

3.    Cluster Table: Storage in a non-transparent database table of type CLUSTER.

4.    Transparent Table (BLOB): Storage in a transparent database table with BLOB (Binary Large Object).

Compared to the Cluster Table, the Transparent Table (BLOB) leads to better system performance if you have large result sets. This is because fewer database operations have to be performed. With smaller result sets, the Cluster Table can be advantageous as BLOB fields require more administrative effort with regard to the database.

With these persistence mode settings, you can test which persistent storage gives the best performance in your system environment for each individual query.

If you do not define a persistence mode for the query, the persistence mode maintained as the default mode in Customizing is used for all the queries created for an InfoProvider.

History
Last changed by/on SAP  20141013 
SAP Release Created in 30A