Siebel Analytics Server Administration Guide > Query Caching in Siebel Analytics Server >

Configuring Query Caching


The query cache is disabled by default. To enable caching, you need to configure the cache storage and decide on a strategy for flushing outdated entries. This section includes information on the tasks necessary to configure the Siebel Analytics Server for query caching.

The parameters to control query caching are located in the NQSConfig.INI file, described in Siebel Analytics Installation and Configuration Guide.

Configuring the Cache Storage

The following items need configuration in the NQSConfig.INI file file for cache storage:

Cache Data Storage Directories

The DATA_STORAGE_PATHS parameter in the CACHE section of the NQSConfig.INI file specifies one or more directories for query cache storage. These directories are used to store the cached query results and are accessed when a cache hit occurs. For information about cache hits, see Cache Hits.

The cache storage directories should reside on high performance storage devices, ideally devoted solely to cache storage. When the cache storage directories begin to fill up, the entries that are least recently used (LRU) are discarded to make space for new entries. The MAX_CACHE_ENTRIES parameter value specifies the maximum number of cache entries allowed in the query cache. The more space you can allocate to the cache, the less often queries will have to access the underlying databases to get the results.

See Siebel Analytics Installation and Configuration Guide for more information about this configuration parameter.

Metadata Filename

The cache metadata file stores information about queries stored in the cache. The Siebel Analytics Server creates and continually updates the metadata file in the location specified in the METADATA_FILE parameter in the CACHE section of the NQSConfig.INI file. The file should reside on a local, high performance, high reliability storage device. Although not required, it is preferable that the cache metadata file reside on a different disk device than the one specified in DATA_STORAGE_PATHS. Storing the metadata file on a different device from the cache directories eliminates the possibility of I/O bottlenecks between the cache files and the metadata file.

During query compilation, each query is evaluated for potential cache hits. The Siebel Analytics Server stores the cache hit information in memory, so this process is very efficient. The metadata file is then accessed for every query that qualifies for a cache hit. The system is designed with a memory buffer for maximum performance and minimum disk I/O. The buffer size is configurable with the BUFFER_POOL_SIZE parameter. Part of the metadata file is stored in this buffer pool. When the buffer pool fills up, it writes the oldest entries to disk and reads in new information from the metadata file. Increasing the value of the BUFFER_POOL_SIZE parameter increases the memory usage and decreases the frequency of reading from and writing to the metadata file.

Maximum Cache Entry Values

You can control the maximum number of rows for any cache entry and the maximum number of cache entries with the MAX_ROWS_PER_CACHE_ENTRY and MAX_CACHE_ENTRIES NQSConfig.INI file parameters, respectively. Limiting the number of rows is a useful way to avoid using up the cache space with runaway queries that return large numbers of rows. Limiting the total number of cache entries provides another parameter with which to manage your cache storage. If the number of rows a query returns is greater than the value specified in the MAX_ROWS_PER_CACHE_ENTRY parameter, the query is not cached.

For the syntax of these parameters, see Siebel Analytics Installation and Configuration Guide.

Aggregates

Typically, if a query gets a cache hit from a previously executed query, then the new query is not added to the cache. The POPULATE_AGGREGATE_ROLLUP_HITS parameter overrides this default when the cache hit occurs by rolling up an aggregate from a previously executed query.

Enabling Query Caching

After configuring the cache storage and deciding on one or more cache management strategies, as discussed in Monitoring and Managing the Cache, you can enable query caching.

To enable query caching

  1. Set the ENABLE parameter in the CACHE section of the NQSConfig.INI file to YES.
  2. Restart the Analytics server.

Disabling Query Caching

This section explains how to disable query caching.

To disable query caching

  1. Set the ENABLE parameter in the CACHE section of the NQSConfig.INI file to NO.
  2. Restart the Analytics server.

 Siebel Analytics Server Administration Guide
 Published: 11 March 2004