Databases Reference
In-Depth Information
Analysis Services retrieves data from the partitions inside the range group in parallel. It
loads data from each partition into a buffer. Because data in partitions with the
DISTINCT_COUNT measure are sorted by distinct values, Analysis Services can easily find the
maximal value that was loaded into buffers of all the partitions and put a bookmark on
that value in each buffer.
NOTE
You cannot configure the number of partitions to be read in parallel when a measure
group contains a DISTINCT_COUNT measure; all partitions that were assigned to a
group will be processed in parallel.
In the next stage, Analysis Services moves all the data prior to the bookmark into the
aggregate bookmark data buffer. Analysis Services aggregates values for
non- DISTINCT_COUNT measures of all the records in this buffer, and assigns value of the
DISTINCT_COUNT measures to 1 . The new record contains data for a certain customer,
which won't appear in any other range group, partition, or buffer. Therefore, Analysis
Services can safely move this record into the aggregate data buffer used to accumulate the
result from all the range groups. In the aggregate data buffer, Analysis Services aggregates
all the records and produces the results for non- DISTINCT_COUNT measures and count of
distinct values.
If one of the partitions in a measure group with a DISTINCT_COUNT measures is a ROLAP
partition, things become more complicated. During the processing, Analysis Services
cannot detect distinct value ranges for ROLAP partitions. Therefore, during the query,
Analysis Services builds a group of partition based on distinct value ranges for MOLAP
partitions and adds ROLAP partitions to each group.
The Query Partition job generates a SQL query with a WHERE clause restricting distinct
values to minimal and maximal values of the group's range. Analysis Services also adds an
ORDER BY clause to the SQL query to ensure that records are produced by the relational
database in the same order as records saved in the MOLAP partitions.
To retrieve data from a ROLAP partition, Analysis Services uses two threads: one to read
from the relational source and the second one to convert data from a relational to multi-
dimensional format. While retrieving data from a measure group that contains a
DISTINCT_COUNT measure, Analysis Services simultaneously scans all partitions in a same
group, so it won't release ROLAP partition job threads to the thread pool until it
completes scanning all data.
To avoid deadlocks, Analysis Services doesn't start a Query Range Group job until it can
get all the threads for all partitions in a group. If there are many ROLAP partitions, it can
require a considerable number of threads to start execution of the request, and so the
number of concurrent requests executed on the system at the same time will decrease.
Search WWH ::




Custom Search