Académique Documents
Professionnel Documents
Culture Documents
Gary Nolan
SAP
SAP AG 2005, 2
SAP AG 2005, 3
Aggregate: Definition Aggregates are subsets of fact table data where summary data is stored as part of new, transparent InfoCubes
Aggregates have the same structure as an InfoCube, with transparent database tables and fact tables surrounded by dimension tables Aggregates are: Used to substantially improve the performance of queries Totally transparent to the users Able to have summarization done during load, not during runtime Used to reduce the volume of data read while querying
SAP AG 2005, 4
Aggregates: Concept
Data transfer from InfoCube to query (revenue grouped by month)
Flow without aggregate
InfoCube
SAP AG 2005, 5
Aggregates: Overview
Aggregates can be created on
Dimension characteristics Navigational attributes Hierarchy levels Time-dependent hierarchies and attributes (as of 30A)
Aggregates cannot be created on Multicubes, RemoteCubes, or ODS Aggregates can be created for
* All characteristics values F Fixed characterisic values H Hierarchy nodes
SAP AG 2005, 6
/BI0/D<CUBENAME>1
/BI0/D<CUBENAME>2
SAP AG 2005, 7
Aggregates: Goal
Cost of aggregate
SAP AG 2005, 8
SAP AG 2005, 9
All aggregates containing navigational attributes and/or hierarchies are realigned and recalculated with the new master data
Affects all aggregates that contain the changed attribute and/or hierarchy Percentage parameter in the IMG determines if the aggregate is fixed or dropped and rebuilt completely Change run can be started for specific InfoObjects Key figures that are set for exception aggregation MIN and MAX cause the aggregates to be completely rebuilt for each change run ABAP Program RSDDS_CHANGERUN_MONITOR can be used to monitor change run in progress
SAP AG 2005, 10
Aggregate Rollup
Applies newly loaded transactional data to the aggregate
The packet is not available for reporting until the aggregate rollup is complete
Prevents user from running reports and getting some data that is in an aggregate and other data that is not in an aggregate
During aggregate rollup the previously rolled up data is available for reporting Can be set to automatic or run as a separate job
Should be set to a separate job if multiple data packets are to be loaded
SAP AG 2005, 11
SAP AG 2005, 12
Creation of Aggregates
SAP AG 2005, 13
While you add InfoObjects to an aggregate, additional InfoObjects may be added automatically by the system in the following cases: Time dimension
If you add an InfoObject (such as 0CALMONTH), all InfoObjects that can be derived from this InfoObject are added automatically (for example, 0CALQUARTER, 0CALYEAR)
Compound objects
SAP AG 2005, 14
Uncompressed Aggregates
Compression refers to the consolidation of data in an aggregate and the elimination of the data packet ID from the data Aggregates are compressed by default
This allows for smaller, more efficient aggregates
SAP AG 2005, 15
SAP AG 2005, 16
Time-Dependent Aggregates
With BW 3.x, you can establish aggregates for time-dependent master data To use the time-dependent aggregates, a key date is set in the time-dependent aggregate
Data is aggregated by key date. If a query is run outside key date, aggregate is not used
Variables can be set on key date to allow for a dynamic setting in the aggregate System automatically adjusts the aggregates key date and values when the adjustment of time-dependent aggregates job is run
This can be set to run in batch via process chains
SAP AG 2005, 17
SAP AG 2005, 18
SAP AG 2005, 19
SAP BW Statistics
Table RSDDSTAT
Aggregates Aggregates
Table RSDDSTATAGGR
Table RSDDSTATWHM
SAP AG 2005, 20
Look for aggregates with Low mean overall time High navigations High percentage db time in relation to overall time
SAP AG 2005, 21
SAP AG 2005, 22
Basis Aggregates Aggregates Aggregates not not affected affected by by change change run run
400,000 records 7,000,000 records Region Country Salesman Product Customer Day Month Year Customer Salesman Product Day Month Year
InfoCube
Basis Aggregate
100,000 records
Aggregate 1
110,000 records
Aggregate 2
30,000 records
Aggregate 3
Bad Aggregates
Very large aggregates
Compare aggregate fact table size with the InfoCube fact table
No more than 20% of fact table is a good rule of thumb
SAP AG 2005, 24
SAP AG 2005, 25
Performance tuning is an ongoing task As business changes occur, new queries are developed potentially requiring new aggregates Volume of data increases, so performance issues could surface
SAP AG 2005, 26
Use of Multi-Providers Exception Aggregation (MIN/MAX, AVG, LAST, FIRST) Time-Dependent Attributes/Hierarchies
Query Design
Virtual Characteristics/Key Figures Calculation before aggregation Filter Criteria Initial View should use aggregate
Database Statistics
SAP AG 2005, 27
SAP AG 2005, 28
SAP AG 2005, 29
Statistics should be used to determine suitable aggregates Aggregates can be created on time-dependent master data Aggregates can be set to be compressed or uncompressed Aggregates should be continually monitored to determine if they are still being used
SAP AG 2005, 30
SAP AG 2005, 31
Questions?
Q&A
Gary Nolan Platinum Consultant, SAP America Inc. gary.nolan@sap.com
SAP AG 2005, 32
SAP AG 2005, 33