You are on page 1of 33

BW302: Performance Analysis Tools in SAP Business Information Warehouse 3.

Mike Eacrett, SAP Labs LLC. Alexander Peter, SAP AG

Learning Objectives

As a result of this workshop, you will be able to:


Analyze a query performance issue Explain different reasons for performance issues Use a broad set of analysis tools delivered with SAP BW 3.5 and SAP WebAS 6.40

SAP AG 2004, SAP TechEd / Session BW302 / 3

Overview Workload Monitor SQL Trace Query Monitor Runtime Analysis of Web Templates Summary

Checklist Query and Web Performance Overview


Which component contributes most? Database Check these points
1. 2. 3. 4. 5. 6. 7. 8. 9. Data Model Query Definition Aggregates OLAP Cache Pre-Calculated Web Templates Compressing Indices DB Statistics DB and basis (Buffer) Parameter

ST03 / Technical Content

OLAP
1. Data Model 2. Query Definition (including OLAP features) 3. Aggregates 4. OLAP Cache 5. Virtual Key Figures / Characteristics 6. Authorizations 1. 2. 3. 4. 5. 6. 7. 8.

Front-end
Query Definition Network WAN and BEx Client Hardware VBA / Java Documents Formatting ODBO / 3rd party

Tools

SQL Trace (ST05) RSRV RSRT, RSRTRACE

RSRT, RSRTRACE SQL Trace (ST05) ABAP Trace (SE30)

IEMON RSRT, RSRTRACE

SAP AG 2004, SAP TechEd / Session BW302 / 5

Overview Workload Monitor SQL Trace Query Monitor Runtime Analysis of Web Templates Summary

Workload Monitor What It Is


What it does
provides general performance-relevant KPIs provides BW-specific performance KPIs for queries

When you use it


as entry point for query- or InfoCube-specific performance issues to check in which area (database, OLAP, front-end) most of the query runtime is spent in order to analyze if aggregates could help

SAP AG 2004, SAP TechEd / Session BW302 / 7

Workload Monitor Screenshot

Switch to expert mode

In the BW System Load section youll get overview on performance figures for particular periods

SAP AG 2004, SAP TechEd / Session BW302 / 8

Workload Monitor Screenshot

Aggregation switches between InfoCube and query view

SAP AG 2004, SAP TechEd / Session BW302 / 9

Workload Monitor Screenshot


All Data provides you with further important key figures

High Select./Transf. ratios might be a good hint for aggregates

SAP AG 2004, SAP TechEd / Session BW302 / 10

Overview Workload Monitor SQL Trace Query Monitor Runtime Analysis of Web Templates Summary

SQL Trace What It Is


What it does records all DB actions shows all DB statements displays the execution plan for each DB statement

When you use it


to check if the DB statistics of your tables are up-to-date to check if your indices are existing and non-degenerated aggregates are used data model is sound buffers and caches are used as expected

SAP AG 2004, SAP TechEd / Session BW302 / 12

SQL Trace Screenshot Execution Plan MS SQL

Full Table Scan

Note: the execution plan looks different for every DBMS.

SAP AG 2004, SAP TechEd / Session BW302 / 13

SQL Trace Screenshot Execution Plan MS SQL 2


Create Index on ODS Object for Sold-to-Party:

Index Seek

SAP AG 2004, SAP TechEd / Session BW302 / 14

SQL Trace How To Read It


Reading Direction
Read from inside out
Read a set of operations on the same level from top to bottom

Example
1. Index Scan
Scan on complete index (clustered index scan means: full table scan)

2. Index Seek
Usage of index

3. Nested Loop

SAP AG 2004, SAP TechEd / Session BW302 / 15

SQL Trace Screenshot Execution Plan ORACLE

Note different node names in ORACLE and in MS SQL New: cost estimation per node

SAP AG 2004, SAP TechEd / Session BW302 / 16

Overview Workload Monitor SQL Trace Query Monitor Runtime Analysis of Web Templates Summary

Query Monitor What It Is


What it does
enables you to execute and debug queries provides settings / parameters for queries gives elementary information on queries

When you use it


to check if and which aggregates are used for a query to have a look at the generated SQL statements to check if the OLAP Cache is used to get performance statistic figures on the query runtime

SAP AG 2004, SAP TechEd / Session BW302 / 18

Query Monitor What It Is

Check Aggregates

Display SQL Statement for query Show Execution Plan Show BW Statistics Bypass Cache, retrieve data from DB

SAP AG 2004, SAP TechEd / Session BW302 / 19

Demo

Demo

SAP AG 2004, SAP TechEd / Session BW302 / 20

Overview Workload Monitor SQL Trace Query Monitor Runtime Analysis of Web Templates Summary

ABAP Trace What It Is


What it does
records (gross and net) execution times for ABAP function calls, method calls,DB statements, etc. can aggregate times and number of calls for each statement (recommended) uses variants to restrict tracing to function groups / classes

When you use it


to identify those parts of an ABAP coding which consumes most of the time (highest optimization potential) to check number of executions per call to locate origin of function / method calls e.g. to analyze customer specific coding like user exits, virtual key figures, etc.

SAP AG 2004, SAP TechEd / Session BW302 / 22

ABAP Trace Screenshots

SAP AG 2004, SAP TechEd / Session BW302 / 23

ABAP Trace Gross and Net Times


Example:
f1 f2 f3 Time

Gross times:

Net times:
+ + + +

SAP AG 2004, SAP TechEd / Session BW302 / 24

ABAP Trace Using Variants

New in SICF

SAP AG 2004, SAP TechEd / Session BW302 / 25

ABAP Trace Setting Clock Accuracy


Some multiprocessor architectures have unsynchronized processor clocks Migration of a process from one processor to the other can lead to negative / implausible execution times Work-around: use software time measurement routines, i.e. set clock resolution to Low from microseconds to milliseconds

SAP AG 2004, SAP TechEd / Session BW302 / 26

Overview Workload Monitor SQL Trace Query Monitor Runtime Analysis of Web Templates Summary

Summary

When faced with performance issues, use Workload Monitor (or BW Technical Content) to identify the area The Query Monitor helps to analyze a query in detail (providing DB tools, breakpoints and debugging options) SQL Trace and ABAP trace may help you for specific database and/or customer-specific ABAP coding problems

SAP AG 2004, SAP TechEd / Session BW302 / 28

Further Information

Public Web:
www.sap.com SAP Developer Network: www.sdn.sap.com BI SAP Customer Services Network: www.sap.com/services/

Related SAP Education Training Opportunities


http://www.sap.com/education/ BW360: BW Performance & Administration

Related Workshops/Lectures at SAP TechEd 2004


ABAP353: Quick-Start on Performance Analysis (Hands-On)

SAP AG 2004, SAP TechEd / Session BW302 / 29

SAP Developer Network


Look for SAP TechEd 04 presentations and videos on the SAP Developer Network. Coming in December. http://www.sdn.sap.com/

SAP AG 2004, SAP TechEd / Session BW302 / 30

Questions?

Q&A
SAP AG 2004, SAP TechEd / Session BW302 / 31

Feedback
Please complete your session evaluation. Be courteous deposit your trash, and do not take the handouts for the following session.

Thank You !

SAP AG 2004, SAP TechEd / Session BW302 / 32

Copyright 2004 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, Outlook, and PowerPoint 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, and Informix are trademarks or registered trademarks of IBM Corporation in the United States 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, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered

trademarks of Citrix Systems, Inc.


HTML, XML, XHTML and W3C 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.
MaxDB is a trademark of MySQL AB, Sweden. 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. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated

companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
SAP AG 2004, SAP TechEd / Session BW302 / 33

You might also like