Databases Reference
In-Depth Information
The data cache registry can also aggregate data and create data cache objects with higher-
granularity data from the data of lower granularity. For example, assume that the data
cache registry already contains a subcube representing all members of the Month attribute,
and the next request to the cache registry uses a subcube for the year 1998. Analysis
Services will find the CacheItem with data for all the months, filter out the data cache
records corresponding to months of 1998, and then aggregate them into another data
cache object that will contain a single record corresponding to the year 1998.
You can use the performance counters in MSAS 2008:Cache to monitor usage of the cache
system. If the cache doesn't contain data, the data cache registry requests this data from
the storage engine. After the data is retrieved, it registers the new subcube and data cache
in the registry.
This way, all the requests from the formula engine to the storage engine come through the
cache subsystem. The data cache registry is integrated with Memory Manager and adjusts
itself when the amount of available memory changes. (For more information about data
cache registry cleanup, see Chapter 27, “Memory Management.”)
You can find out whether your query retrieves data from the cache by monitoring the
Query Subcube trace event with SQL Server Profiler. If you see that EventSubclass is Non-
cache data , the query missed the cache, and the request was executed by retrieving data
from the storage. However, when you see the GetDataFromCache event with
EventSubclass equal to Get data from measure group cache , the internal request was
answered from the cache.
NOTE
A single MDX query can send multiple requests to the storage engine. Therefore, it's
possible that you will see multiple QuerySubcube events, and some of the internal
requests will be answered from the cache and others from the storage.
Formula Caches
Data structures for formula caches that the formula engine uses to store calculated values
are very similar to the data cache registry used to cache data retrieved from the multidi-
mensional store. Each Scope object has its own formula cache registry. When Analysis
Services retrieves data from the formula cache registry, it iterates the stack of Scope objects
available in the current context.
Similar to the data cache registry, the formula cache registry holds subcubes produced by
the calculation execution plans and data caches that contain the results of calculations.
The formula cache registry also contains an index that enables fast access to the data
stored in the cache.
The Calculation execution plans that fall back to individual calculation of cell values do
not use the formula cache registry. For the results provided by this type of calculation
execution plan, Analysis Services has a special cache called the flat cache . Instead of
storing a subcube for each individual cell, Analysis Services stores the following informa-
Search WWH ::




Custom Search