About the Global Cache

7-14 System Administrators Guide for Oracle Business Intelligence Enterprise Edition

7.5.3 Manually Editing Additional Query Cache Parameters

You can set additional query cache parameters in the NQSConfig.INI file, including the following: ■ The DATA_STORAGE_PATHS parameter specifies one or more directories for query cache storage, and the maximum size for each storage directory. These directories are used to store the cached query results and are accessed when a cache hit occurs. See Section 7.7.1, About Cache Hits for more information about when cache is hit. 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_ROWS_PER_CACHE_ENTRY parameter controls the maximum number of rows for any cache entry. 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. If the number of rows a query returns is greater than the value specified in the MAX_ROWS_PER_CACHE_ENTRY parameter, then the query is not cached. ■ 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. See Appendix A, NQSConfig.INI File Configuration Settings for more information about the additional query cache parameters.

7.5.4 Using Fusion Middleware Control to Set Global Cache Parameters

Before you begin this procedure, ensure that you are familiar with the information in Section 3.2, Using Fusion Middleware Control to Update Oracle Business Intelligence Configuration Settings. To use Fusion Middleware Control to set global cache parameters: 1. Go to the Business Intelligence Overview page, as described in Section 2.2.2, Using Fusion Middleware Control to Manage Oracle Business Intelligence System Components. 2. Display the Performance tab of the Capacity Management page.

3. Click Lock and Edit Configuration to allow changes to be made.

4. Complete the elements using the descriptions in the Help topic for the page. Click the Help button on the page to access the page-level help for the following options: ■ Global cache path ■ Global cache size 5. Click Apply, then click Activate Changes. 6. Return to the Business Intelligence Overview page and click Restart. For information about using methods in the Oracle BI Systems Management API to change configuration settings, see Chapter 22, Introducing the Oracle BI Systems Management API. Managing Performance Tuning and Query Caching 7-15

7.5.5 Manually Editing Additional Global Cache Parameters

You can set additional global cache parameters in the NQSConfig.INI file, including the following: ■ The MAX_GLOBAL_CACHE_ENTRIES parameter controls the maximum number of entries that are allowed in the global cache store. ■ The CACHE_POLL_SECONDS parameter specifies the interval in seconds at which the Oracle BI Server pulls from the logical event queue to synchronize with other server nodes in the cluster. ■ The CLUSTER_AWARE_CACHE_LOGGING parameter controls whether logging is turned on for the global cache. Change this setting to YES only for debugging purposes. Log entries appear in nqquery.log. You can find this file at: ORACLE_INSTANCE \diagnostics\logs\OracleBIServerComponent\coreapplication_obisn See Appendix A, NQSConfig.INI File Configuration Settings for more information about the additional global cache parameters.

7.6 Monitoring and Managing the Cache

To manage the changes in the underlying databases and to monitor cache entries, you must develop a cache management strategy. You need a process to invalidate cache entries when the data in the underlying tables that compose the cache entry have changed, and a process to monitor, identify, and remove any undesirable cache entries. This section contains the following topics: ■ Section 7.6.1, Choosing a Cache Management Strategy ■ Section 7.6.2, Purging and Maintaining Cache Using ODBC Procedures ■ Section 7.6.3, How Repository Changes Affect the Query Cache

7.6.1 Choosing a Cache Management Strategy

The choice of a cache management strategy depends on the volatility of the data in the underlying databases and the predictability of the changes that cause this volatility. It also depends on the number and types of queries that comprise your cache and the usage those queries receive. This section provides an overview of the various approaches to cache management.

7.6.1.1 Disable Caching for the System

You can disable caching for the entire system to stop all new cache entries and stop any new queries from using the existing cache. Disabling caching lets you enable it at a later time without losing any entries that are stored in the cache. Temporarily disabling caching is a useful strategy in situations where you might suspect having stale cache entries, but want to verify if they are actually stale before purging those entries or the entire cache. If you find that the data stored in the cache is still relevant, or after you have safely purged problem entries, then you can safely enable the cache. If necessary, purge the entire cache or the cache that is associated with a particular business model before enabling the cache again. See Section 7.5.1, Using Fusion Middleware Control to Enable and Disable Query Caching for more information.