Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Learning Objectives
SAP BW Architecture
Agenda
Modeling
Query Performance
Analysis Methods
Agenda
Modeling
Query Performance
Analysis Methods
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
Checklist
BW Reporting Performance
Aggregates
Pre-calculated Web Templates
OLAP Cache
Package
Agenda
Modeling
Query Performance
Analysis Methods
Checklist
Dimensions of InfoCubes
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
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
SID Dimension Fact Table Dimension SID SID Fact Table Dimension SID
MultiProvider Consolidated
view on all data
Basic
InfoCube
With Data
Virtual
No Data
Multi
Multi InfoCube
Provider
Provider
Master Data
InfoSet
ODS Object
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
Inclusion / Exclusion
MultiProvider Query
Cell Calculation
Customer Exits
Agenda
Modeling
Query Performance
Analysis Methods
Performance Layers
Performance Layers
For specific Scenarios
Offline Analysis
Pre-Calculation Performance
Performance
OLAP Cache
Aggregates
Reuse
Reuse
InfoCubes
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
OLAP Cache 1
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
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
Trapp 01001100000
Smith 10000011100
Miller 00110000111
rowid
B-Tree Index
Good for range queries and for high cardinality
Miller
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
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
Agenda
Modeling
Query Performance
Analysis Methods
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
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
SQL
SQLTrace
Trace(ST05)
(ST05) SQL
SQLTrace
Trace(ST05)
(ST05)
SAP AG 2003, TechED EMEA, BW354, Alexander Peter, Uwe Heinz
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
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
{Material,
Material
Basic InfoCube Group,
Customer,
Day}
{Material
Few large Group,
basic Customer,
aggregates Day}
{Material
Many small
Group,
aggregates
Month}
Navigational
NavigationalAttribute
Attributefor
for
Characteristic
CharacteristicCustomer
Customer
Customer Industry
Fact Aggregate
AggregateTables:
Tables: Sales
SalesData
Data
FactTable:
Table: Sales
SalesData
Data
Country
Country Space
Space
Country Customer Sales Industry
Industry **
Navigational
NavigationalAttribute
Attributefor
for
Characteristic
CharacteristicCustomer
Customer
Customer Industry
Fact Aggregate
AggregateTables:
Tables: Sales
SalesData
Data
FactTable:
Table: Sales
SalesData
Data
Country
Country Space
Space
Country Customer Sales Industry
Industry **
Agenda
Modeling
Query Performance
Analysis Methods
Debug Option
Structure
Available
to be read
Aggregates
Number of Suggested
Database Aggregates
Access
* disaggregated
space aggregated
F fixed value
H hierarchy level aggregation
Deactivate Trace
Analyze Trace
Explain
Total Number of statement-identical statements
Fetch, Close)
Total Execution Time in microsec (Prep, Open,
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
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
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
Output
produced by
analyze_iemon
Graphical
representation
with a few
clicks
httpmon.exe Setup
First execution:
download of MIME
objects
Summary
Further Information
Public Web:
www.sap.com Solutions Business Intelligence
SAP Customer Services Network: www.sap.com/services/
Questions?
Q&A
Feedback
Thank You !
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.