Databases Reference
In-Depth Information
Querying Different Types of Measure Groups
Starting from the third phase—Query Organizer—retrieval of data from the partition
depends on the partition type and follows different code paths for different types of parti-
tions. In the following sections, we discuss data retrieval from relational online analytical
processing (ROLAP) and multidimensional online analytical processing (MOLAP) parti-
tions. In addition, Analysis Services follows different algorithms when it retrieves data
from measure groups that have DISTINCT_COUNT measures, measure groups that have
many-to-many dimensions, and regular measure groups.
Querying Regular Measure Groups
After Analysis Services detects that the request doesn't reference many-to-many dimen-
sions and the measure group doesn't contain a DISTINCT_COUNT measure, it creates a Query
Measure Group job. During its initialization, Analysis Services iterates over all the parti-
tions, verifies partition slices, and checks whether the subcube of the partition slice inter-
sects with the request subcube, which indicates whether partition contains the requested
data. For all partitions that contain requested data, Analysis Services creates Query
Partition jobs. If no partition slice was defined and indexes weren't built for this partition,
Analysis Services creates Query Partition jobs for all the partitions in a measure group.
Figure 30.2 demonstrates the scheme Analysis Services uses to query the partitions of a
regular measure group.
When Analysis Services creates a Query Partition job, it detects whether requested data is
fact data and stored inside this partition, or it's aggregated data and stored inside of one of
the aggregations. Therefore, if server configuration enables aggregations, Analysis Services
iterates over available aggregations and checks whether an aggregation contains requested
data. The mechanism of data lookup in an aggregation is similar to the mechanism used
to retrieve data from the cache registry. (For more information about the cache subsystem,
see Chapter 29, “Architecture of Query Execution—Calculating MDX Expressions.”)
After Analysis Services detects the part of partition that contains requested data, it uses
partition metadata to build a query plan. While building a query plan, Analysis Services
makes the following optimizations:
.
Analysis Services analyzes attribute relationships and deducts attributes that weren't
specified in a subcube slice by related attributes that where specified. For example, if
a subcube in a request contains a slice by Seattle, Analysis Services sets a slice on
Washington and on US .
Search WWH ::




Custom Search