Está en la página 1de 33

SAP TechEd 03 Basel

Performance Tuning for


SAP Business
Information Warehouse
Alexander Peter
Product Manager BI, SAP AG
Uwe Heinz
Developer BI, SAP AG

Learning Objectives

As a result of this workshop, you will be able


to:
Differentiate and Analyse Performance Issues
Explain effects of modeling on performance
Suggest means to improve query and data load performance
Trace Web Queries

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 1


SAP TechEd 03 Basel

SAP BW Architecture

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Agenda

General Settings and Checklist

Modeling

Query Performance

Extraction / Data Load Performance

Analysis Methods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 2


SAP TechEd 03 Basel

Agenda

General Settings and Checklist

Modeling

Query Performance

Extraction / Data Load Performance

Analysis Methods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Performance Tuning in BW
Performance Tuning OLTP
OLTP Systems
Application Development and
performance tuning separated Database
Performance tuning by basis
experts
Application

Performance Tuning

SAP BW SAP BW
Performance Tuning as
holistic process over
application design and
database configuration
Database

Application

Performance Tuning
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 3


SAP TechEd 03 Basel

General Performance Rules


Basic Rules for Performance Optimization:

Be economic: Eliminate all unnecessary


processes
Keep it small: Reduce the data volume to
be processed
Do it parallel: Deploy parallelism on all
available levels

Parallel processes are fully scalable

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Checklist

Sound Data Model


The Data Model is one of the most important issues

BW Reporting Performance
Aggregates
Pre-calculated Web Templates
OLAP Cache

Extraction / Data Load Performance


Recommendations in SAP notes 130253 and 417307

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 4


SAP TechEd 03 Basel

Performance Guidelines General Aspects 1


Database (or Physical) Partitioning
Database tables are cut into smaller chunks (partitions)
One logical database table
Transparent for user
Available for the following database management systems
Range Partitioning: ORACLE, Informix, IBM DB2/390
Hash Partitioning: IBM DB2/UDB

Year / Month Customer Sales


2003/01 4711 10
2003/01 4712 15 Database
2003/01 4713 20 Partition
Database
2003/01 4714 23
Table
(logical) 2003/02 4711 44
2003/02 4713 32 Database
2003/02 4714 17 Partition

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Performance Guidelines General Aspects 2


Database (or Physical) Partitioning
Benefits
Parallel accesses to partitions
Read smaller sets of data
Fast Deletion of partitions (DROP PARTITION instead DELETE FROM WHERE)
Automatically Partitioned Database Tables (for Range Partitioning)
InfoCube F-Fact table: partitioned by request
PSA table: partitioned by request
ODS Change Log: similar to PSA table
User Defined Partitioning Criteria (for Range Partitioning)
InfoCube E-Fact table
Partition Criteria: Time characteristics like month or fiscal period
Note: Both fact tables are extended by the SID of the chosen time
characteristic

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 5


SAP TechEd 03 Basel

Performance Guidelines General Aspects 3


Database (or Physical) Partitioning
Query Access (Partition Pruning)

Package

Example: F table has to


Month = be read, too
August 2003 Package 2
Package 5 F
Package 7
month Time
Jan - Mar Month Customer Sales
Aug 03 4711 15
Apr - Jun
Master Data Dimension E Aug 03 4712 66
Jul - Sep
Oct - Dec

Fact Table Discard irrelevant


Apply Restrictions to partitions
Dimensions Apply Restriction
to fact table
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Agenda

General Settings and Checklist

Modeling

Query Performance

Extraction / Data Load Performance

Analysis Methods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 6


SAP TechEd 03 Basel

Checklist

Design of Operational Store, Data Warehouse Layer and


Multidimensional Model

Dimensions of InfoCubes

Logical (MultiProvider) Partitioning

Non-Cumulative Key Figures

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Operational Data Store and Data Warehouse Layer

Data Warehouse Operational Data Store Multidimensional Models


Non volatile Operational Reporting Multidimensional analysis
Granular Near Real-Time / Volatile Aggregated view
Integrated Granular Integrated
Historical foundation Built with ODS Objects Built with InfoCubes
Built with ODS Objects

ODS Object ODS Object

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 7


SAP TechEd 03 Basel

InfoCubes
SAP-Extended Star Schema
ONE Normalization of Dimensions
Master Data is shared, not part of the InfoCube
Master
Master Master
Master
Data
Data Data
Data
Surrogate Key
Dimension
Dimension Dimension
Dimension

Dimension ID

Fact
FactTable
Table

Dimension
Dimension Dimension
Dimension

Master
Master Master
Data Master
Data Data
Data

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

InfoCubes
Master Data
Hierarchies
Attributes
Texts (Multi-Language
Support)
Master
Master
SID Table
SID Table
Data
Data
Dimension
Dimension

Fact
FactTable
Table
Hierarchies

Attributes Texts
Plant UK
Customer Street Account Plant Germany
Plant Australia

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 8


SAP TechEd 03 Basel

Data Modeling Line Item Dimensions 1


Line Item Dimensions
Direct Link from InfoCube Fact Table to Master Data SID Table without
dimension table
Only one characteristic is possible in a line item dimension
Recommended for large dimensions (e.g. invoice number, order number,
but also reasonable for large material or customer dimensions)

SID Dimension Fact Table Dimension SID SID Fact Table Dimension SID

Without line With line


item item
dimension dimension

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Data Modeling Line Item Dimensions 2


Line Item Dimensions
Benefits
Saves one table join at query runtime
Saves determination of dimension IDs at data load time
Disadvantages
F4 Help not possible on dimension values (only on master data values)

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 9


SAP TechEd 03 Basel

Data Modeling MultiProviders 1


MultiProvider (or Logical) Partitioning
Possible partitioning criteria: year, plan/actual, regions, business area
Parallel sub-queries are started automatically to basic InfoCubes
Use MultiProvider Partitioning to cut large amounts of data in chunks

MultiProvider Consolidated
view on all data

Basic InfoCubes Europe Asia USA

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Data Modeling MultiProviders 2


MultiProviders (SAP BW 3.x)
Definition
Combination of InfoCubes, ODS objects, InfoObjects and InfoSets

Basic
InfoCube
With Data

Virtual
No Data

Multi
Multi InfoCube
Provider
Provider

Master Data

InfoSet

ODS Object

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 10


SAP TechEd 03 Basel

Data Modeling MultiProviders 3


MultiProviders
Benefits
No additional data storage
Single InfoProviders smaller, less complex and less sparsely filled than one big
InfoProvider
(Parallel) Data load into individual InfoProviders
Queries are split automatically and distributed to InfoProviders (parallel
execution)
Transparent usage for Reporting
Local queries on each InfoProvider possible
Archiving of single basic InfoProvider is very easy
Disadvantages
Adminstration (with aggregates)
Additional I/O

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Data Modeling Non-Cumulative KFs 1


Non-cumulative key figures
Non-cumulative key figures cannot be cumulated meaningfully over time,
e.g. inventory, number of employees
Storage: Historical movements and reference point (in E fact table)
Reference point is updated when InfoCube is compressed; if all requests
are compressed, the reference point represents e.g. the current stock
Example:
Month Material Plant Material flow Reference point
Jan 02 4711 1000 10 0
Compressing 10
Feb 02 4711 1000 20 10
Mar 02 4711 1000 5 10
Compressing 35

Note: the reference points are only stored in the compressed E-table;
they have the time value infinity, e.g. for day 31.12.9999

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 11


SAP TechEd 03 Basel

Data Modeling Non-Cumulative KFs 2


Performance Tips & Tricks:
Compress InfoCubes with non-cumulative key figures as soon as
possible
Very granular characteristic value combinations generate lots of
reference points in the E table
Aggregate rebuild is significantly influenced
Delete unused values (e.g. old seasonal material) from the InfoCube by
selective deletion without timely restriction)
LAST- and FIRST- key figures can use aggregates; AVG-key figures
cannot use them. Try to split these key figures in separate queries, if
semantically possible
At query time use tight restrictions on time characteristics; ideally
request only current values
Suppress sum lines if not needed
Do not use partial time characteristics (e.g. FISCPER3) if not needed

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Data Modeling Non-Cumulative KFs 3


Validity Objects
Validity Objects are characteristics for which a validity period can be
defined
The validity is stored within the validity table
Example: If plant 1 is closed at the end of March, it should not show up
any value (even no zero) in April and May
Jan Feb Mar Apr May Reference point
Plant 1 +10 +20 +30 100
Plant 2 +20 +10 +10 +20 +30 150

Every entry in the validity table generates an individual SELECT at query


runtime.
Use as few validity objects as possible
Do not misuse validity objects for termination (e.g. insurance contract)

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 12


SAP TechEd 03 Basel

Checklist Query Design

Multi-dimensional Query Design

Inclusion / Exclusion

MultiProvider Query

Cell Calculation

Customer Exits

Query Read Mode

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Agenda

General Settings and Checklist

Modeling

Query Performance

Extraction / Data Load Performance

Analysis Methods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 13


SAP TechEd 03 Basel

Checklist Query and Web Performance


Overview
ST03
ST03/ /Technical
TechnicalContent
Content
Which component
contributes most?
Database
Database OLAP
OLAP Frontend
Frontend
1.1. Data
DataModel 1.1. Data 1.1. Query
QueryDefinition
Model DataModel
Model Definition
Check 2.2. Query
these QueryDefinition
Definition 2.2. Query
QueryDefinition
Definition 2.2. Network
Network
(including
(includingOLAP
OLAP
points 3.3. Aggregates
Aggregates 3.3. WAN
WANand
andBEx
BEx
features)
features)
4.4. OLAP
OLAPCache
Cache 4.4. Client
ClientHardware
Hardware
3.3. Aggregates
Aggregates
5.5. Pre-Calculated
Pre-CalculatedWeb
Web 5.5. VBA
VBA/ /Java
Java
4.4. OLAP
OLAPCache
Cache
Templates
Templates 6.6. Documents
Documents
5.5. Virtual
VirtualKey
KeyFigures
Figures/ /
6.6. Compressing
Compressing Characteristics
Characteristics 7.7. Formatting
Formatting
7.7. Indices
Indices 6.6. Authorizations
Authorizations 8.8. ODBO
ODBO/ /33rdparty
rd
party
8.8. DB
DBStatistics
Statistics
9.9. DB
DB andbasis
and basis
(Buffer)
(Buffer)Parameter
Parameter
SQL
SQLTrace
Trace(ST05)
(ST05) RSRT,
RSRT,RSRTRACE
RSRTRACE
Tools RSRV SQL IEMON
RSRV SQL Trace(ST05)
Trace (ST05) IEMON
RSRT,
RSRT,RSRTRACE ABAP RSRT,
RSRT,RSRTRACE
RSRTRACE ABAPTrace
Trace(SE30)
(SE30) RSRTRACE
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Performance Layers
Performance Layers
For specific Scenarios

Offline Analysis

Pre-Calculation Performance
Performance

OLAP Cache

Aggregates
Reuse
Reuse
InfoCubes

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 14


SAP TechEd 03 Basel

Aggregates 1
Aggregate Definition
Materialization of aggregated subsets of InfoCube fact table data
Independent structures where summary data is stored within separate,
transparent InfoCubes
Transparency: Users do not notice if aggregate is hit or not
Improved query performance by reducing the amount of data to be read from
DB
Aggregates can be created
Only on top of basic InfoCubes
For dimension characteristics
For navigational attributes
On hierarchy levels
Using time-dependent navigational attributes (as of BW 3.x)
Using hierarchy levels where the structure is time-dependent (as of BW 3.x)
Note: Aggregates cannot be built on MultiProviders, SAP Remote Cubes,
Remote Cubes or ODS Objects
Aggregates can improve query performance considerably, but keep in
mind that they also impact the load performance. For more information,
see chapter on data load performance.
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Aggregates 2 Example
Example for flow with and without aggregates

Flow without aggregate


Database Selection OLAP Engine

Month Material Revenue


Month Material Revenue July Hammer 10
July Hammer 10 July Nail 20
July Nail 20 August Hammer 10
August Hammer 10 Month Revenue
August Nail 20
August Nail 20 July 30
InfoCube August 30
Number of records read
on the database
Records
transferred to BW
instance after
Month Revenue Month Revenue being summarized
July 30 July 30 on the database
August 30 August 30
Aggregate

Flow with aggregate

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 15


SAP TechEd 03 Basel

Aggregates 3 Tips for Creating Aggregates


Do the following steps
Call query or InfoCube overview in technical content or ST03
Sort by mean overall time to find queries/InfoCubes with highest
runtimes
Calculate the KPI aggregation ratio = number of records read from DB /
number of records transferred
Check quota of database time to total runtime
As a rule of thumb, an aggregate is reasonable and may be created, if:
Aggregation ratio > 10, I.e. 10 times more records are read than are
displayed, AND

Percentage of DB time > 30%, I.e. the time spent on database is


a substantial part of the whole query runtime

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

OLAP Cache 1

Caching in SAP BW 3.x OLAP Cache


Global cache which is accessible from all sessions
OLAP Cache is part of application buffer (Imp/Exp SHM) and
can also be stored in a DB table or a file
The Cache stores query results and navigation statuses as
highly compressed cluster data
Query Cache is used for equal queries or subsets of cached
queries
Benefits: OLAP Cache reduces workload on database and
application server
Invalidations:
Data Load into underlying DataTarget
Query Generation

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 16


SAP TechEd 03 Basel

Pre-Calculated Web Templates 1


Pre-Calculated Web Templates
Pre-calculation is a set of techniques where you can distribute the
workload of running the report to off-peak hours, and have the report
result set ready for very fast access to the data
Data Pre-Calculation or HTML Pre-Calculation
HTML Pre-Calculation can be used for Offline Analysis
Benefits
Fast response time
System workload shifted to off-peak hours
Re-use data that goes to many queries
Reports also available offline

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Pre-Calculated Web Templates 2

Scenario
Supports Newspaper scenario
Quick access to many reports
Reports are requested by many users
Static reporting, usually little navigation
requirements
Active Reporting Authorisations
Restrictions
No invalidation when new data is loaded
Restricted navigation: only filtering possibles

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 17


SAP TechEd 03 Basel

Reporting Performance Indices

Indices
If you report on ODS objects with a restrictive selection
key, check if indices are defined for this key
Check if the InfoCube Indices exist
In ORACLE, you can choose between bitmap index and B-
tree index
Use B-tree index, if dimension size exceeds 10% of the fact
table size
If you select on navigational attributes, be sure that an
appropriate index is available

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Reporting Performance ODS Objects


F
Indexing ODS Objects u ODS Object
l
Indices can be defined in the l
3.x ODS object maintenance; in Doc.No. Customer Sales
t 4711 Miller 10
BW 2.x indices must be defined a
4712 Smith 20
via SE11 b
4713 Miller 25
l
Use indices on e 4714 Cassano 35
characteristics which you are s
4715 Birch 12
accessing regularly (for 4716 Smith 44
c
a
reporting or DataMart interface) n

Example: If you look for


sales figures with
ODS Object Index customer Birch, a full
table scan is necessary
Doc.No. Customer Sales when there is no index
4711 Miller 10 Miller
4712 Smith 20
(see picture above); if the
Smith
4713 Miller 25 Cassano index has been created,
4714 Cassano 35 Birch only two DB accesses
4715 Birch 12 are necessary (see
4716 Smith 44 picture on the left).

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 18


SAP TechEd 03 Basel

Reporting Performance Indices


Index types (selection)
Bitmap Index
Well-suited for few characteristic values
Several bitmap indexes can be used for one table (bitmap merge join)

Trapp 01001100000
Smith 10000011100
Miller 00110000111
rowid
B-Tree Index
Good for range queries and for high cardinality

Miller

Leask Osbourne Smith

Brown Moloney Page


Miller Trapp
Leask Osbourne Smith

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Indexing in SAP BW

Fact Table
Non-Unique Index on every dimension ID
ORACLE: Bitmap (except for high cardinality dimensions)
ORACLE: B-tree on F-fact table for transactional InfoCubes
(guarantees parallel read&write)
ORACLE: additional bitmap index on time characteristic SID for
partitioned InfoCubes
DB2/AS400: EVI
Other DBMSs: B-Tree
DB2/OS390: B-Tree not on package dimension ID
Non-unique B-Tree on all dimension IDs (Primary Key)
Used for compression
ORACLE/Informix: only on E-fact table

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 19


SAP TechEd 03 Basel

Indexing in SAP BW
Dimensions
Dimension ID (primary key)
Unique B-Tree
Master Data SIDs
Non-Unique B-Tree
ORACLE / DB2/AS400: not on first SID (this is included in the
index on all SIDs)
On all master data SIDs
Non-Unique B-Tree

Master Data
X- and Y- tables (SIDs for all navigational attributes)
Unique B-Tree on <SID, Objectversion> (primary key)
Additional indices could be defined for individual SID-columns
to avoid full table scans (for selective accesses)
S-table (SID)
Unique B-Tree on master data key (primary key)
Unique B-Tree on SID

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Agenda

General Settings and Checklist

Modeling

Query Performance

Extraction / Data Load Performance

Analysis Methods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 20


SAP TechEd 03 Basel

Checklist Data Load Performance Overview 1

Technical
TechnicalContent,
Content,Data
DataLoad
LoadMonitor
Monitor
Which component
contributes most?
Extraction
Extraction Transfer
Transfer Load
LoadInto
IntoPSA
PSA

1.1. Customer
CustomerExits 1.1. Resource 1.1. I/O
I/OContention
Exits ResourceContraint
Contraint Contention
2.2. Resource
ResourceUtilization 2.2. CPU
Utilization CPU/ /Memory
Memory
Check 3.3. Load
Bottleneck
Bottleneck
these LoadBalancing
Balancing
3.3. Network
Network
points 4.4. Data
DataPackage
PackageSize
Size
4.4. Application
ApplicationBuffer
Buffer
5.5. Indices on tables
Indices on tables Synchronization
Synchronization
6.6. Flat
FlatFile
Fileformat
format
7.7. Content
Contentvs.vs.generic
generic
extractor
extractor

Extractor
ExtractorChecker
Checker
(RSA3),
(RSA3), SM50
SM50
Tools ABAP
ABAPTrace
Trace(SE30),
(SE30), SQL
SQLTrace
Trace(ST05)
(ST05) OS
OSMonitor
Monitor(ST06)
(ST06)
SQL Trace (ST05) OS
SQL Trace (ST05) OSMonitor
Monitor(ST06)
(ST06) DB Monitor (ST04)
DB Monitor (ST04)
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Checklist Data Load Performance Overview 2

Technical
TechnicalContent,
Content,Data
DataLoad
LoadMonitor
Monitor
Which component
contributes most?

Transfer
TransferRules Load
Rules LoadInto
IntoData
DataTargets
Targets
Update Rules
Update Rules
Master
MasterData
Data InfoCubes
InfoCubes ODS
ODSObjects
Objects

1.1. Transformation 1.1. Buffering


Buffering 1.1. Roll-up
Transformation Roll-up 1.1. Parallel
Parallel
Check Rules Number
Number
Rules/ /ABAP
ABAP Ranges 2.2. Change
ChangeRun
Run
ODS
ODS
these Coding
Coding Ranges activation
3.3. Compression activation
points 2.2. Transformation 2.2. Change
Change Compression
Transformation 2.2. Unique
UniqueData
Data
Library Run
Run 4.4. Indices
Library Indices Records
Records
Formulas 5.5. Load
Formulas LoadMaster
Master 3.3. Flag
FlagBEx
BEx
Data
Databefore
before Reporting
Transaction Reporting
Transaction
Debugger
Debuggerwithin
within Data 4.4. Indices
Indices
Data
Monitor
Monitor 6.6. Buffering
Buffering
ABAP Number
ABAPTrace
Trace Number
Ranges
Tools (SE30),
(SE30), Ranges

SQL
SQLTrace
Trace(ST05)
(ST05) SQL
SQLTrace
Trace(ST05)
(ST05)
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 21


SAP TechEd 03 Basel

Loading Master Data 1

Number Ranges
SID number range can be buffered instead of accessing the
DB for each SID
If you encounter massive accesses to DB table NRIV via SQL
trace (ST05), increase the number range buffer in transaction
SNRO
If possible, reset the value to its original state after the load
(to avoid unnecessary memory allocation)
SID Material Number
SID Buffer
1 4711
4
2 0815
5
3 4712
6
7
8
Draw new SID
New material: 1125 from Buffer

SID

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Roll-Up Performance 1
Roll-up
The roll-up process populates all aggregates of an InfoCube
with the newly loaded delta load
Basic Rule: InfoCube and all depending aggregates must be
in-sync, i.e. you must see the same data no matter if it has
been derived from the InfoCube or the aggregate
Newly loaded data is not available for reporting until it has
been rolled up into the aggregates
Aggregate Hierarchy
Aggregates can be built out of other aggregates to reduce the
amount of data to be read and, hence, to improve the roll-up
performance
Aggregate hierarchy is determined automatically
General Guideline: define few basis (large) aggregates and
many small aggregates that can be built from the hierarchy
level before

Display aggregate
hierarchy

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 22


SAP TechEd 03 Basel

Roll-Up Performance 1 Aggregate Hierarchy


Example: Optimized Aggregate Hierarchy
Example

{Material,
Material
Basic InfoCube Group,
Customer,
Day}

{Material
Few large Group,
basic Customer,
aggregates Day}

{Material
Many small
Group,
aggregates
Month}

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Change Run Performance 1


Change Run
Aggregates can contain
Dimension Characteristics
Navigational Attributes
Hierarchy Levels
When master data changes, the changes of the
navigational attributes/hierarchies must be applied to the
depending aggregates; this process is called change run
Newly loaded master data is not active until the change
run has been applied the changes to all aggregates
Threshold for delta and new build-up in customizing
The Change Run can be parallelized across InfoCubes;
see SAP note 534630 for more details
Check aggregate hierarchy (see Roll-Up for more details)
Try to build basis aggregates that are not affected by the
change run, i.e. no navigational attributes nor hierarchy
levels
The following slides show details on the process itself
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 23


SAP TechEd 03 Basel

Change Run 2 Before Master Data Activation

Navigational
NavigationalAttribute
Attributefor
for
Characteristic
CharacteristicCustomer
Customer
Customer Industry

Winsoft Inc. Technology


Funny Duds Inc. Consumer Products Changed master data
Old: Internetworks Technology not available for
Thor Industries Chemical reporting
New: Internetworks Consumer Products

Fact Aggregate
AggregateTables:
Tables: Sales
SalesData
Data
FactTable:
Table: Sales
SalesData
Data
Country
Country Space
Space
Country Customer Sales Industry
Industry **

USA Winsoft Inc. 10 Sales


Germany Internetworks 15 Industry
USA Funny Duds Inc. 5
Austria Internetworks 10 Technology 60
Austria Thor Industries 10 Consumer Products 25
Germany Funny Duds Inc. 20 Chemical 10
USA Winsoft Inc. 25

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Change Run 3 After Master Data Activation

Navigational
NavigationalAttribute
Attributefor
for
Characteristic
CharacteristicCustomer
Customer
Customer Industry

Winsoft Inc. Technology


Funny Duds Inc. Consumer Products Changed master data
Old: Internetworks Technology now available for
Thor Industries Chemical reporting
New: Internetworks Consumer Products

Fact Aggregate
AggregateTables:
Tables: Sales
SalesData
Data
FactTable:
Table: Sales
SalesData
Data
Country
Country Space
Space
Country Customer Sales Industry
Industry **

USA Winsoft Inc. 10 Sales


Germany Internetworks 15 Industry
USA Funny Duds Inc. 5
Austria Internetworks 10 Technology 35
Austria Thor Industries 10 Consumer Products 50
Germany Funny Duds Inc. 20 Chemical 10
USA Winsoft Inc. 25

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 24


SAP TechEd 03 Basel

Agenda

General Settings and Checklist

Modeling

Query Performance

Extraction / Data Load Performance

Analysis Methods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Query Monitor (RSRT) 1


Analyze specific queries

Debug Option

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 25


SAP TechEd 03 Basel

Query Monitor (RSRT) 2


Analyze specific queries
Check if the right aggregate(s) is(are) used by the query

Structure
Available
to be read
Aggregates

Number of Suggested
Database Aggregates
Access
* disaggregated
space aggregated
F fixed value
H hierarchy level aggregation

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Performance Analysis: SQL Trace (ST05) 1


Analyze high database runtime
Trace specific process with SQL Trace

Activate SQL Activate Trace


Trace Flag
Execute process

Deactivate Trace
Analyze Trace

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 26


SAP TechEd 03 Basel

Performance Analysis: SQL Trace (ST05) 2

Explain
Total Number of statement-identical statements

Percentage of value-identical statements

Fetch, Close)
Total Execution Time in microsec (Prep, Open,

Total number of rows

Table name or DB procedure


SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Performance Analysis: SQL Trace Explain

5. Join other requested


dimensions to the result via
hash join

4. Access fact table partition by


partition through local index
3. Calculate AND of bitmap
streams
1. Find all bitmap streams for
package restriction

2. Find all bitmap streams for


fiscal periods

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 27


SAP TechEd 03 Basel

SQL Explain
Basic Help to Read the Execution Plan
Read from inside out of the hierarchy
Read a set of operations at the same level from top to bottom
Important node names (ORACLE)
Hash Join
Smaller Table is used to build up hash table on the join key (optimal: in
memory)
Then scanning the larger table with hash table
Nested Loop
For each relevant row in the first table, find all matching rows in the
other table
Bitmap Merge (=Or) / Bitmap And
Partition Range Iterator

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Web Query Analysis Overview

2 different measuring points:


backend
frontend
OLAPINIT
ICM
OLAP Cache
HTTP Monitor

HTTP
request
WAS / BW / DB DB
HTML
response
Web Browser OLAP
IEMonitor
Rendering

Frontend monitoring
Network traffic monitoring

Monitoring of WAS / BW /
DB internal activities

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 28


SAP TechEd 03 Basel

Web Query Analysis Frontend Monitoring

Key Performance Indicators for Frontend Monitoring:


Query response time
Time to load HTML page
Frontend rendering time
Transferred data volume
Number of round-trips between frontend and server

IEMon.exe
Simple Web browser replacement with protocol logging facilities
Used to analyze load and frontend rendering time of an HTML page
Easy deployment

httpmon.exe
Set up as a proxy server
Requires changes of IE settings
Requires environment variables to be set for configuration

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

IEMon.exe Log File Analysis in Excel

Output
produced by
analyze_iemon

Graphical
representation
with a few
clicks

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 29


SAP TechEd 03 Basel

httpmon.exe Setup

Set up as a proxy server

Configuration by environment variables:


HTTP_PROXY: proxy_server:proxy_port
(e.g. pwdf0754:1080)
NO_PROXY: list of web server domains
which do not need proxy (e.g. *.sap.corp;*.sap-ag.de)

httpmon listens on port 8000 by default


change Internet Explorer settings

other Web servers


port 8000 (no prxy required) proxy_port
httpmon

Web Browser Proxy server


SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Httpmon.exe Use Case

First execution:
download of MIME
objects

Second execution: MIME


objects were read from
browser cache

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 30


SAP TechEd 03 Basel

Summary

Now you are able to:


Differentiate and Analyse Performance Issues
Explain effects of modeling on performance
Suggest means to improve query and data load performance
Trace Web Queries

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Further Information

Public Web:
www.sap.com Solutions Business Intelligence
SAP Customer Services Network: www.sap.com/services/

SAP Service Marketplace


http://service.sap.com/bw Performance

SAP BW Online Documentation


http://help.sap.com

Related SAP Training Courses


BW360: Performance & Administration

Collective Performance Notes


Note 567745: DB-specific Settings
Note 567746: Query & Web Performance
Note 567747: Extraction & Loading

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 31


SAP TechEd 03 Basel

Questions?

Q&A

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

Feedback

Please complete your session evaluation and


drop it in the box on your way out.

Thank You !

The SAP TechEd 03 Basel Team

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 32


SAP TechEd 03 Basel

Copyright 2003 SAP AG. All Rights Reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express
permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other
software vendors.
Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered trademarks of
Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,
OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix
and Informix Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries.
ORACLE is a registered trademark of ORACLE Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, the Citrix logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin and
other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.
HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World Wide Web Consortium,
Massachusetts Institute of Technology.
JAVA is a registered trademark of Sun Microsystems, Inc.
JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license for technology invented
and implemented by Netscape.
MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services mentioned
herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in
several other countries all over the world. All other product and service names mentioned are the trademarks of
their respective companies.

SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz

2003 SAP AG BW 354, Uwe Heinz; Alexander Peter 33

También podría gustarte