You are on page 1of 33

Aggregates.

Contents.

Aggregate Concepts. Building Aggregates. Performance Analysis Tools & Techniques. Aggregate Maintenance.

Aggregate Concepts:

Definition: Aggregates are materialized subsets of Info cube data, where the data is preaggregated and stored in an Info cube structure Purpose: To accelerate the response time of Queries, by reducing amount of data that must be read in the database for a navigation step.

Query execution: Order of data availability check.


1

Local OLAP cache


2

OLAP Processor
4

Global OLAP cache


3

Info provider on Database

Aggregates on Database (if applicable)

Aggregates can be created : For Basic Info Cubes. On dimensional Characteristics. On Navigational attributes. On Hierarchy levels. Using Time dependent navigational attributes. Using Hierarchy levels where the structure is Time-dependent.(>=3.x)

Aggregates are not possible for:

Multi provider
Remote cube ODS object Info set

Different Aggregation Levels: Defining Aggregates:


* --- Group according to characteristic or attribute value. H --- Group according to nodes of hierarchy levels. F --- Filter according to fixed value.

Ex: Grouped by Characteristic


Info cube
Country
USA Germany USA Austria Austria Germany USA

Sales Data
Customer
Win soft Inter N/w Funny duds Inter N/w Thor Ind. Funny duds Win soft

Aggregate Country
Country
USA Germany Austria

Sales Data *
Sales 40 35 20

Sales
10 15 5 10 10 20 25

Ex: Using Filters.


Info cube
Country USA Germany USA Austria Austria Germany USA

Sales Data
Sales 10 15 5 10 10 20 25

Aggregate

Sales Data

Customer Win soft Inter N/w Funny duds Inter N/w Thor Ind. Funny duds Win soft

Country Customer

F Germany *

Country Germany Germany

Customer Inter N/w Funny duds

Sales 15 20

Ex: Aggregation using Navigational attributes.


Navigational attribute for Customer Customer Win Soft. Funny Duds Inter N/w Thor Ind. Industry Technology Consumer Prod Technology Chemical

Info cube
Country
USA Germany USA Austria Austria Germany USA

Sales Data
Customer
Win soft Inter N/w Funny duds Inter N/w Thor Ind. Funny duds Win soft

Aggregate

Sales Data

Sales
10 15 5 10 10 20 25

Customer-Industry *
CustomerIndustry Technology Consumer Prod Chemical Sales
60

25 10

Ex: Aggregation using Time dependant Master Data.


Master Data Table:
country Valid to

Country
Valid from Sales person

Austria Austria Germany Germany USA

1/1/2000 1/1/2001 1/1/2000 4/1/2001 1/1/2000

12/31/2000 12/31/2001 12/31/2000 12/31/2001 12/31/2001

Huber Meyer Meyer Huber Smith

Info cube
Country
USA Germany USA Austria Austria Germany USA

Sales Data
Customer
Win soft Inter N/w Funny duds Inter N/w Thor Ind. Funny duds Win soft

Sales
10 15 5 10 10 20 25

Aggregate Sales person Key Date

Sales Data * 9/1/2001

Sales Person Revenue


Huber Meyer Smith 35 20 40

Ex: Aggregation for Hierarchies


Hierarchy for Country:
ALL

Europe

America

Germany

Austria

USA

Info cube
Country
USA Germany USA Austria Austria Germany USA

Sales Data
Customer
Win soft Inter N/w Funny duds Inter N/w Thor Ind. Funny duds Win soft

Sales
10 15 5 10 10 20 25

Aggregate

Sales Data

Country H, Level 2 *
Country America Europe Sales 40 55

Query Behavior: Multiple aggregates per navigation

As many queries are comprised of multiple select statements, they may be automatically split up over several aggregates.
Query

DB Access

DB Access

DB Access

Aggr1

Aggr2

Info Cube

OLAP Processor: Query Splitter


The split of a query is rule-based: Parts of the query on different aggregation levels are split. Parts with different selections on characteristic are combined. Parts on different hierarchy levels or parts using different hierarchies are split.

After the split, OLAP processor searches for an optimal aggregate for each part. Parts which use the same aggregate will be combined again (in some cases it is not possible to combine them).

Building Good Aggregates


Tips for Building (and Maintaining) Good Aggregates:

Relatively small compared to parent Info Cube Try for summarization ratios of 10 or higher Find good subsets of data (frequently accessed) Build on some hierarchy levels, not all Not too specific, not too general should serve many different query navigations Should be frequently used and used recently (except basis aggregates)

Building Bad Aggregates


Characteristics of Bad Aggregates: Too many very similar aggregates Aggregates not small enough (compared to parent cube) Too specific for a query not enough general one. Old aggregates, not used recently Infrequently or unused aggregates

Exceptions: A large aggregate containing navigational attributes may benefit Performance despite its size (but remember the tradeoff) Basis Aggregate may be large and may not be used for reporting but still be useful for maintenance

Save status Filled Aggregation level (Type of aggregation like..* , F ,H) * => based on char value. F => fixed value is the type of aggregation H => Hierarchy level Records=> no.of records in aggregate. Records summarized ( mean value)=> no.of rec in infocube/no.of rec in aggr. (i.e.,average no.of records in info cube that are combined to form a record in the aggregate). Valuation ---I , I+,I++++,I etc It is systems estimate Of aggregate value .(depending on the usefulness of the aggregate) Usage=> no.of times that aggr has been accessed by olap processor for reporting. Last used => Indicates when the aggregate is last used. Fixed Hierarchy Hierarchy level 0factcount value for each rec in aggr=> no.of rec in infocube that were aggregated for that char combination.

Proposal by Query Definition.

Proposal by Combination.

Performance Analysis Tools And Techniques.

ST03 (Workload Monitor) RSRT (Query Monitor) RSDDSTAT Table. RSRTRACE (Trace Tool) RSRCATTTRACE.

Work Load Monitor ST03

Using ST03 Drill down to query

RSRTQuery Monitor

RSRTQuery Monitor

RSRTRACETrace Tool.

RSRTRACE->RSRCATTTRACE

Aggregate Maintenance
Aggregate maintenance is required to:

Achieve the balance between : Time to maintain aggregates and Many Fast Queries. See that the data in aggregate must be in sync with the underlying Info cube. See that the changes in Hierarchy/attributes should be available to the aggregate.

Maintenance of Aggregates

Activating & Filling: To use an aggregate when executing a query you should first activate it and then fill it with data. Roll Up: To apply newly loaded Transactional data to the aggregate. Change run: To activate the changes of master data and hierarchies. During Change run, all aggregates containing navigational attributes and/or hierarchies are realigned Adjustment of time dependent aggregates: To recalculate aggregates with time dependent navigational attributes.

Roll Up Performance : Aggregate Hierarchy

Thank You!!!

You might also like