You are on page 1of 29

BW Performance Tuning:

Aggregates

Deborah Board
BW RIG USA
Know How Conference Call
July 6, 2000

 SAP America Know How Conference Call Jujy 6, 2000 1


Agenda

Introduction

Definition of Aggregates

Creating Aggregates

Finding Effective Aggregates

Analyzing Queries

 SAP America Know How Conference Call Jujy 6, 2000 2


Agenda

Introduction

Definition of Aggregates

Creating Aggregates

Finding Effective Aggregates

Analyzing Queries

 SAP America Know How Conference Call Jujy 6, 2000 3


BW Performance Issues

Database BW

DB Tuning
Data Modeling

DB Statistics
Aggregates

Query Optimization
BW Statistics
Indexes

Partitioning

 SAP America Know How Conference Call Jujy 6, 2000 4


Agenda

Introduction

Definition of an Aggregate

Creating Aggregates

Finding Effective Aggregates

Analyzing Queries

 SAP America Know How Conference Call Jujy 6, 2000 5


An InfoCube's Star Schema
Region Dimension
city regioncountry

Sales Org Dimension


Time Dimension

sales person
day

division
month
distribution channel

year sales organization

productproduct
group (1) Fact Table

Product Dimension (2) Dimensions


 SAP America Know How Conference Call Jujy 6, 2000 6
(3) Characteristics
A Typical Query

region country = 'US' or 'CA'

month

relevant facts
year = 1999

product
group (1) Fact Table
(2) Dimensions
 SAP America Know How Conference Call Jujy 6, 2000 7
(3) Characteristics
A Suitable Aggregate
Region Dimension
regioncountry
Time Dimension

month

year

productproduct
group (1) Fact Table

Product Dimension (2) Dimensions


 SAP America Know How Conference Call Jujy 6, 2000 8
(3) Characteristics
Aggregates ...

 ... are like InfoCubes,

 ... summarize ("aggregate") data of the originating InfoCube,

 ... contain redundant information, but

 ... accelerate the access to that information,

 ... are for InfoCubes what DB indexes are for DB tables,

 ... are performance-enhancing features.

 SAP America Know How Conference Call Jujy 6, 2000 9


Aggregates - Goal

The goal of aggregates is to balance

Cost of aggregate Reduced retrieval


maintenance Cost

 SAP America Know How Conference Call Jujy 6, 2000 10


Agenda

Introduction

Definition of an Aggregate

Creating Aggregates

Finding Effective Aggregates

Analyzing Queries

 SAP America Know How Conference Call Jujy 6, 2000 11


Aggregates - Examples

Defining Aggregates

* group according to characteristic or attribute value


H group according to nodes of a hierarchy level
F filter according to fixed value
space do not use characteristic or attribute in aggregate

 SAP America Know How Conference Call Jujy 6, 2000 12


Aggregates - Example

Fact Table: Sales Data Aggregate Tables: Sales Data

Country Customer Sales Country *


Customer Space
USA Buggy Soft Inc. 10
Germany Ocean Networks 15 Country Sales
USA Funny Duds Inc. 5
Austria Ocean Networks 10 USA 40
Austria Thor Industries 10 Germany 35
Germany Funny Duds Inc. 20 Austria 20
USA Buggy Soft Inc. 25

 SAP America Know How Conference Call Jujy 6, 2000 13


Aggregates - Example Using Filters

Fact Table: Sales Data Aggregate Tables: Sales Data

Country Customer Sales Country F, Germany


Customer *
USA Buggy Soft Inc. 10
Germany Ocean Networks 15 Country Customer Sales
USA Funny Duds Inc. 5
Austria Ocean Networks 10 Germany Ocean Networks 15
Austria Thor Industries 10 Germany Funny Duds Inc. 20
Germany Funny Duds Inc. 20
USA Buggy Soft Inc. 25

 SAP America Know How Conference Call Jujy 6, 2000 14


Aggregates - Example Using Master Data

Master Data Table: Customer

Customer Industry

Buggy Soft Inc. Technology


Funny Duds Inc. Consumer Products
Ocean Networks Technology
Thor Industries Chemical

Fact Table: Sales Data Aggregate Tables: Sales Data

Country Space
Country Customer Sales
Industry *
USA Buggy Soft Inc. 10 Sales
Germany Ocean Networks 15 Industry
USA Funny Duds Inc. 5
Austria Ocean Networks 10 Technology 60
Austria Thor Industries 10 Consumer Products 25
Germany Funny Duds Inc. 20 Chemical 10
USA Buggy Soft Inc. 25

 SAP America Know How Conference Call Jujy 6, 2000 15


Aggregates - Example Using Hierarchies

Hierarchy for Country All

Europe America

Germany Austria USA

Fact Table: Sales Data Aggregate Tables: Sales Data

Country Customer Sales Country H, Level 2


Customer Space
USA Buggy Soft Inc. 10
Germany Ocean Networks 15 Country Sales
USA Funny Duds Inc. 5
Austria Ocean Networks 10 America 40
Austria Thor Industries 10 Europe 55
Germany Funny Duds Inc. 20
USA Buggy Soft Inc. 25

 SAP America Know How Conference Call Jujy 6, 2000 16


Aggregates - Facts in SAP BW

Aggregates Aggregates
can be created cannot be created

 on dimension characteristics  on navigational attributes of time-


dependent master data
 on navigational attributes
 on hierarchy levels where the
 on hierarchy levels structure is time-dependent
 for non BasicCubes

 SAP America Know How Conference Call Jujy 6, 2000 17


Aggregates - Maintenance of

Activate & Switch Show aggregate


Fill on/off hierarchy Transport

BDS
Valuation of
the aggregate

unsaved
changes

 SAP America Know How Conference Call Jujy 6, 2000 18


Aggregates - Hierarchy of

 SAP America Know How Conference Call Jujy 6, 2000 19


Agenda

Introduction

Definition of an Aggregate

Creating Aggregates

Finding Effective Aggregates

Analyzing Queries

 SAP America Know How Conference Call Jujy 6, 2000 20


Aggregates - Proposals

Suggest useful Optimize


aggregates proposals

 SAP America Know How Conference Call Jujy 6, 2000 21


Aggregates - Proposals

Before aggregate creation After aggregate creation

 Gather information about end-user  Allow time for users to execute


query requirements and drill-down queries and collect SAP BW-
patterns Statistics
 Aggregates are suggested based  Aggregates can be suggested
on query design based on SAP BW-Statistics
 Execute the query multiple times  Analyze the use of aggregates
using realistic drill-down scenarios
 Modify aggregates for optimization

 SAP America Know How Conference Call Jujy 6, 2000 22


Aggregates - Proposals

 SAP America Know How Conference Call Jujy 6, 2000 23


Aggregates - Rules for Efficiency

 Define the aggregate on the required level of detail and


afterwards add all characteristics which can be derived from the
component of the aggregate (business logic).

For example, if 0Calmonth is a component of the aggregate, you


should add 0Calquarter and 0Calyear as well.

You should also add 0Fiscper if the Fiscal periods correspond


to the month

 Avoid placing the characteristic and its navigational attributes


in the same aggregate

 Avoid aggregates which are as large as the InfoCube itself

 SAP America Know How Conference Call Jujy 6, 2000 24


Aggregates - Size

Aggregates w/ Navigational Aggregates w/o Navigational


Attributes or Hierarchies Attributes or Hierarchies
 For frequent changes to master data  Size of aggregate: 5 to 10% of
or hierarchy structures: size of the fact table may be acceptable
aggregate < 1% of the InfoCube /
Basis aggregate
 For infrequent changes: larger sizes
are OK

 SAP America Know How Conference Call Jujy 6, 2000 25


Agenda

Introduction

Definition of an Aggregate

Creating Aggregates

Finding Effective Aggregates

Analyzing Queries

 SAP America Know How Conference Call Jujy 6, 2000 26


Query - Analyze

Query-Analyzing Tools:

 Query monitor (Transaction RSRT > execute & debug)

 Trace-Tool (Transaction RSRTRACE > all logs >


double click on the protocol of interest > DB debugging)

 SAP America Know How Conference Call Jujy 6, 2000 27


Query - Analyze

 SAP America Know How Conference Call Jujy 6, 2000 28


Query - SAP BW Statistics

 Meaning of the most important fields of the SAP BW Statistic


- QDBSEL: Number of selected Records on the DB
- QDBTRANS: Number of Records transferred to the server
- QTIMEDB: Time in Seconds on the DB
all fields are explained in detail in OSS note 130696

 If the quotient of QDBSEL divided by QDBTRANS is greater


than 10 and if the QTIMEDB is too high, you should think
about an aggregate

 Switch on/off certain aggregates to see whether they are


efficient or not

 SAP America Know How Conference Call Jujy 6, 2000 29

You might also like