Proven Tips and Techniques To Optimize Query Performance in Sap Netweaver BW 7.3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

_________________________________

_________________________________
_________________________________
_________________________________
_________________________________
Proven Tips and _________________________________
Techniques to Optimize _________________________________
Query Performance in _________________________________
SAP NetWeaver BW 7.3 _________________________________
_________________________________
Anurag Barua _________________________________
Strata-Gems Consulting & Solutions _________________________________
© 2012 Wellesley Information Services. All rights reserved.

In This Session, I Will … _________________________________


_________________________________
• Discuss what causes a query to suffer from poor performance
• Walk you through how you can monitor query performance at _________________________________
various levels _________________________________
• P id recommendations
Provide d ti on how
h query performance
f can be
b _________________________________
improved by taking measures on the back end, as well as the
front end _________________________________
• Delve deep into critical areas, such as aggregates and the OLAP _________________________________
cache, and see how you can leverage them for getting better
_________________________________
query performance
• Share thoughts on whether SAP HANA is the right choice for your _________________________________
organization _________________________________
_________________________________
_________________________________
1
_________________________________
What We’ll Cover …
_________________________________
• Major reasons for poor query performance
_________________________________
• Monitoring queries and identifying performance bottlenecks
_________________________________
• Get queries to run faster by back-end measures and fine tuning
• Get queries to run faster by front-end measures and fine tuning _________________________________
• SAP HANA: Implementation Considerations _________________________________
• Wrap-up _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
2

Causes for Bad Query Performance _________________________________


_________________________________
• There could be numerous reasons for sub-optimal query
performance, but generally speaking: _________________________________
ΠIf several queries on the same InfoProvider are suffering from _________________________________
poor performance,
performance your best bet is to look at your star schema
_________________________________
design and analyze if your data models are designed in an
efficient manner _________________________________
f It is critical to design a robust data model that efficiently
_________________________________
incorporates your reporting/analytical needs
_________________________________
ƒ Since it is very costly to re-engineer your data models
once data
d t is
i lloaded,
d d you needd tto spend
d a llott off time
ti _________________________________
upfront in coming up with a good data model
_________________________________
_________________________________
_________________________________
3
_________________________________
About the Star Schema
_________________________________
• Design of InfoCubes is based on the star schema, which is a fact
_________________________________
table surrounded by dimension tables
ΠFact table contains all the information in the form of _________________________________
characteristic IDs and key figure values,
values and dimension tables _________________________________
contain the lookup values for characteristic IDs
_________________________________
• If not designed to meet needs, such as granularity, frequency of
loads, volume of data, reporting requirements, etc., you are likely _________________________________
to witness sub-optimal performance
_________________________________
• Special attention must be paid to design of dimensions
_________________________________
ΠWhich characteristics go into a particular dimension must be
given serious consideration _________________________________
f Utilization of “line-item dimensions” _________________________________
_________________________________
4

Causes for Bad Query Performance _________________________________


_________________________________
• Broadly, bad query performance falls into three major categories
1. Bottlenecks and design issues in the front end
_________________________________
f Query design, including the number and choice of query _________________________________
elements,
l t such h as variables,
i bl formulas,
f l restricted
t i t d and
d _________________________________
calculated key figures, conditions, exceptions, etc.
f Which InfoProviders are being used to what end
_________________________________
f Timing and execution of queries _________________________________
f Tool being used (BEx Analyzer vs. Web reporting, _________________________________
workbooks,, etc.))
_________________________________
f And many more!
_________________________________
_________________________________
_________________________________
5
_________________________________
Causes for Bad Query Performance (cont.)
_________________________________
• Broadly, bad query performance falls into three major
_________________________________
categories (cont.)
2. Insufficient fine-tuning and optimization in the back end _________________________________
ΠNon-utilization
N tili ti off aggregates
t _________________________________
ΠNo partitioning and/or compression of InfoCubes
_________________________________
ΠNot setting the correct query read mode
_________________________________
ΠNon-utilization of OLAP Cache

ΠAnd many more!


_________________________________
3 Inadequate hardware,
3. hardware which is generally a result of inaccurate _________________________________
sizing and/or cost issues _________________________________
Œ Your SAP NetWeaver® BW system may not have enough
memory and/or the processing horsepower in terms of _________________________________
processor speed and capacity _________________________________
6

What We’ll Cover … _________________________________


_________________________________
• Major reasons for poor query performance
• Monitoring queries and identifying performance bottlenecks _________________________________
• Get queries to run faster by back-end measures and fine tuning _________________________________
• Get queries to run faster by front-end measures and fine tuning _________________________________
• SAP HANA: Implementation Considerations
_________________________________
• Wrap-up
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
7
_________________________________
Technical Content
_________________________________
• SAP provides standard business content that helps you collect
_________________________________
and analyze all kinds of statistical information
ΠTechnical content is frequently enhanced, and SAP NetWeaver _________________________________
BW 7.x
7 x offers many more InfoCubes and DataStore Objects _________________________________
(DSOs) than SAP BW 3.5
_________________________________
f Do not forget to activate the technical content (like all other
business content) _________________________________
_________________________________
Before activating itit, make sure you have a _________________________________
strategy of collecting and reporting on these
statistics. Based on your needs, you may not _________________________________
need to activate all the content. _________________________________
_________________________________
8

Technical Content (cont.) _________________________________


_________________________________
• Queries that run off technical content provide you with a treasure-
trove of statistical information _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
9
_________________________________
Monitoring Statistical Information
_________________________________
• Statistical information based on time spent by query in various
_________________________________
activities is stored in various tables
ΠThis helps you analyze and troubleshoot the area where a query _________________________________
is getting stuck _________________________________
• In SAP NetWeaver BW 7.0 onwards, collection of statistics for
_________________________________
query runtime analysis has been changed
ΠYou can now select InfoProviders, queries, workbooks, and _________________________________
Web templates for defining the nature of statistics collection _________________________________
f Only for queries can you specify detailed information; for
_________________________________
others you can only specify whether statistics collection is
on or off _________________________________
ΠEvent ID tracks the events in the life cycle of a query _________________________________
_________________________________
10

Statistics in SAP NetWeaver 7.0 _________________________________


_________________________________
• Dumped into two tables
ΠRSDDSTAT_OLAP: All runtime information of queries in the
_________________________________
front end (including in Web applications) and OLAP Processor _________________________________
ΠRSDDSTAT_DM:
RSDDSTAT DM Runtimes
R ti f extracting
for t ti datad t outt off BW _________________________________
InfoProviders and SAP NetWeaver BW Accelerator (if used)
f Also includes statistics on queries that run off MultiProviders
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
11
_________________________________
A Few Other Important Tables
_________________________________
• RSDDSTATHEADER
_________________________________
ΠHeader information per SAP NetWeaver BW object
_________________________________
• RSDDSTATINFO
ΠStatistical information by navigation steps _________________________________
• RSDDSTATEVDATA _________________________________
ΠKey figures and statistics for events
_________________________________
• RSDDSTATEVENTS
_________________________________
ΠMaster data table for event IDs

• RSDDSTATDM _________________________________
ΠData Manager query statistics reports _________________________________
• RSDDSTATAGGRDEF _________________________________
ΠStatistics data for aggregates
_________________________________
12

A Few Other Important Tables (cont.) _________________________________


_________________________________
• RSDDSTATEXTRACT
ΠExtractor BW statistics: Time of last delta load
_________________________________
• RSDDSTATOBJLEVEL _________________________________
ΠObjects for query runtime and their Statistic properties _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
13
Other Important Monitoring Tools and Sources of Statistical _________________________________
Information
_________________________________
• Workload Analysis Monitor
_________________________________
ΠProvides you with very useful monitoring information (albeit of
a very technical nature) _________________________________
f Invoked
I k d viai ttransaction
ti ST03 _________________________________
ƒ Switch to transaction ST03N for the expert mode
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
14

Other Important Monitoring Tools and Sources of Statistical _________________________________


Information (cont.)
_________________________________
• SQL Trace
ΠIf you can read SQL queries, this is the most useful tool
_________________________________
f Invoked via transaction ST05 _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
15
Other Important Monitoring Tools and Sources of Statistical _________________________________
Information (cont.)
_________________________________
• ABAP Trace
_________________________________
ΠGeneric SAP tool used by ABAPers
_________________________________
f Invoked via transaction SE30 and useful in determining
(
(usually)
ll ) what
h t performance
f d
drags (if any)) are caused
dbby _________________________________
virtual Key Figures (KYFs) and characteristics
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
16

Other Important Monitoring Tools and Sources of Statistical _________________________________


Information (cont.)
_________________________________
• Query Monitor
ΠProvides you with detailed information on operational aspects
_________________________________
of individual queries _________________________________
f Invoked
I k db by running
i ttransaction
ti RSRT _________________________________
ƒ “Execute + Debug” option helps you to debug a query
during a simulated run _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
17
_________________________________
What We’ll Cover …
_________________________________
• Major reasons for poor query performance
_________________________________
• Monitoring queries and identifying performance bottlenecks
_________________________________
• Get queries to run faster by back-end measures and fine tuning
• Get queries to run faster by front-end measures and fine tuning _________________________________
• SAP HANA: Implementation Considerations _________________________________
• Wrap-up _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
18

All About the Read Mode _________________________________


_________________________________
• What is the “Read” mode?
ΠDetermines the way in which data/results are returned from the
_________________________________
OLAP processor when a query is run _________________________________
ΠThere
Th are three
th options
ti _________________________________
f “A” – Query to read all data at once
_________________________________
f “X” – Query to read data during navigation

f “H” – Query to read when you read or expand hierarchies


_________________________________
ƒ The selection of a read mode has significant impact on _________________________________
query performance,
performance so select wisely!
_________________________________
_________________________________
_________________________________
_________________________________
19
_________________________________
Implications of Choosing Read Mode
_________________________________
• (H) – Query to read when you read or expand hierarchies
_________________________________
ΠRecommended mode; smallest result set returned, but
maximum trips to database (on demand); supports aggregates _________________________________
the best _________________________________
• (X) – Query to read data during navigation
_________________________________
ΠRead data only when it is needed, i.e., during navigating
_________________________________
f Performance improvement wrought by reducing database
and server loads _________________________________
• ((A)) – Queryy to read all data at once _________________________________
ΠLeast preferable option; to be used in very special
circumstances, e.g., when a very large result set (with minimal
_________________________________
navigation) is required _________________________________
_________________________________
20

Setting the Read Mode for a Query _________________________________


_________________________________
• Run transaction RSRT Œ insert query’s technical name Œ click
on “Properties” tab Œ do an “F4” on Read Mode _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
21
_________________________________
Aggregates
_________________________________
• What are aggregates?
_________________________________
ΠSummarized version of InfoCubes meant to expedite query
execution by providing a compressed dataset _________________________________
f Unlike
U lik M MultiProviders,
ltiP id th
they are ttangible
ibl andd occupy space on _________________________________
the database
_________________________________
f If not planned and designed properly, aggregates may be a
bane rather than a boon _________________________________
ƒ Sole rationale for creating aggregates should not be “the _________________________________
query is taking forever to run!”
_________________________________
ƒ Understand the overhead involved in maintaining
aggregates; frequent attribute changes will require _________________________________
frequent “change runs” on aggregates to keep them in _________________________________
sync with underlying InfoCube
_________________________________
22

How to Create Aggregates _________________________________


_________________________________
• If you are unsure and want the system to do the heavy lifting for
you, you can have the system propose aggregates to you _________________________________
ΠKeep in mind that SAP will propose a whole lot of aggregates, _________________________________
some of which you are not likely to need
_________________________________
Œ If you’ve done your homework, you may be better off creating
your own aggregates _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
23
_________________________________
When to Create Aggregates
_________________________________
• Since aggregates are a mixed blessing, you need to understand
_________________________________
when it makes sense to create them
ΠGeneral rule of thumb: Based on query statistics: _________________________________
f If multiple
lti l queries
i on an InfoCube
I f C b are reading
di 10 times
ti the
th _________________________________
number of records from the database than are displayed AND
_________________________________
f Percent of time spent on the database as a percent of the
total runtime of the query is more than 30%, then: _________________________________
ƒ Consider creating an aggregate _________________________________
f Note: These p percentages
g are not cast in stone and yyou can _________________________________
go for lower or higher thresholds
ƒ When to create an aggregate is as much art as it is science
_________________________________
_________________________________
_________________________________
24

Maintenance of Parameters for Aggregates _________________________________


_________________________________
• In the IMG or by running transaction RSCUSTV8
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
25
_________________________________
Why Do You Need to Maintain Parameters?
_________________________________
• To address how attribute (master data + hierarchies) change runs
_________________________________
are handled
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
26

Details of Parameters _________________________________


_________________________________
• Limit with Delta
ΠWhen a change run is performed on an underlying InfoCube,
_________________________________
aggregates need to be adjusted using one of three options _________________________________
f They
Th can be b reconstructed
t t d from
f scratch
t h eachh time
ti _________________________________
f They can undergo the delta process where new records are
entered in +ive values and old ones in –ives _________________________________
f Combination of the two methods _________________________________
ƒ You can specify a percent at which the system switches _________________________________
between reconstruction and delta. The value should be
between 0 and 99. _________________________________
_________________________________
_________________________________
_________________________________
27
_________________________________
Details of Parameters (cont.)
_________________________________
• Block Size
_________________________________
ΠDetermines approximately how large the individual chunks of
data that are read at a time are _________________________________
f Number
N b shouldh ld bbe chosen
h judiciously
j di i l Πtoo
t smallll a number
b _________________________________
could mean too many reads and thus poor performance; too
_________________________________
large a number could mean temporary tablespace may
overflow _________________________________
• Wait Time _________________________________
ΠLength of time (in minutes) a process waits before it aborts
_________________________________
f An appropriate number should be chosen based on the
expected duration of your change run _________________________________
_________________________________
_________________________________
28

The OLAP Cache _________________________________


_________________________________
• Very useful performance-enhancing technique that speeds up
query execution by saving data that is frequently accessed in the _________________________________
main memory, the application server, or the network _________________________________
ΠEven though OLAP Cache was introduced in SAP BW 2.0B, 2 0B the
_________________________________
ability to configure cache settings was not available until SAP
BW 3.0B _________________________________
f With the design of the global cache, cache settings are
_________________________________
available to all users, not just individual users, as was the
case prior to SAP BW 3.0B _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
29
_________________________________
The OLAP Cache (cont.)
_________________________________
• When you configure the global cache, settings apply to all queries
_________________________________
ΠNot all queries will be cached though Πwhich ones will be
cached is based on several factors, such as the complexity of _________________________________
the query,
query how frequently it is accessed,
accessed etc.
etc _________________________________
• If there is reason to make your settings more specific, you can set
_________________________________
them for an individual InfoProvider and even individual queries
ΠMake sure there is a good rationale for making settings on a _________________________________
specific level because it could be counter-productive _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
30

Configuring the OLAP Cache _________________________________


_________________________________
• In transaction RZ10, the buffer size for the global cache is set up
ΠThis is a Basis/SAP NetWeaver administration activity and if
_________________________________
you are not an administrator, you may not have access to this _________________________________
transaction
_________________________________
• In the IMG, you need to carry out the following navigation (in an
SAP NetWeaver BW 7.0 system) in order to make additional _________________________________
settings: _________________________________
ΠSAP NetWeaver ΠBusiness Intelligence ΠPerformance
_________________________________
Settings ΠGlobal Cache Settings
_________________________________
_________________________________
_________________________________
_________________________________
31
_________________________________
IMG Settings for OLAP Cache
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
32

IMG Settings for OLAP Cache (cont.) _________________________________


_________________________________
• There are several parameters that you can configure
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
33
_________________________________
OLAP Cache Settings for Individual Queries
_________________________________
• Go to the Query Monitor by running transaction RSRT
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
34

OLAP Cache Settings for Individual Queries (cont.) _________________________________


_________________________________
• Do a drop down on Cache Mode to view options and select
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
35
_________________________________
OLAP Cache Settings for Individual InfoProvider
_________________________________
• Let’s take an InfoCube and an SAP Demo Cube and select the
_________________________________
Environment menu entry and navigate as shown
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
36

OLAP Cache Settings for Individual InfoProvider (cont.) _________________________________


_________________________________
• Click on the “Query/Cache” tab and select the desired value for
each of the parameters (just like in transaction RSRT) _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
37
_________________________________
Partitioning (of InfoCube)
_________________________________
• It is a powerful mechanism by which the fact table is split into
_________________________________
several chunks based on the calendar month (0CALMONTH) and
fiscal year/period (0FISCPER) characteristics _________________________________
ΠEnhances performance by facilitating the parallel running of _________________________________
queries since the target dataset does not reside in one
contiguous chunk _________________________________
Œ It is the “E” Fact table that gets partitioned _________________________________
ΠPartitioning is rendered useless if compression is not done _________________________________
beforehand
_________________________________
f In SAP NetWeaver BW 7.x onwards, you can repartition data
_________________________________
_________________________________
_________________________________
38

Creating a Partition _________________________________


_________________________________
• Go to the maintenance of your InfoCube and navigate as follows:
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
39
_________________________________
Compression
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________

• Whatt is
Wh i compression?
i ? _________________________________
ΠAn SAP Best Practice that results in the reduction of the _________________________________
volume of data stored in the fact table of an InfoCube _________________________________
_________________________________
40

Compression (cont.) _________________________________


_________________________________
• Since data comes to SAP NetWeaver BW in packages, the same
data (records) are sometimes repeated but with different Request _________________________________
IDs _________________________________
ΠA query on such data has to aggregate this data when the query
_________________________________
executes, leading to poor performance
• Compression strips the Request ID off similar records in different _________________________________
data packages and combines them into a single aggregated _________________________________
record
_________________________________
Œ Compressed data is moved from the “F” to “E” fact table
_________________________________
_________________________________
_________________________________
_________________________________
41
_________________________________
Compression (cont.)
_________________________________
• It has one major disadvantage: Once the Request IDs are deleted,
_________________________________
there is no way to selectively delete data package
ΠOnce data is compressed, it cannot be disaggregated _________________________________
ΠIf space is
i nott a constraint,
t i t you can circumvent
i t this
thi limitation
li it ti _________________________________
by keeping a copy of your uncompressed InfoCube
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
42

Indexes/Indices _________________________________
_________________________________
• Indices can be built on multiple SAP NetWeaver BW Objects in
order to gain performance improvements for queries _________________________________
ΠDSOs allow you to create secondary indices on characteristics _________________________________
of your choice
_________________________________
f Good practice to create indices on characteristics that your
queries most frequently access _________________________________
f Make sure you keep your secondary indices updated _________________________________
• InfoCube fact tables have indices for each dimension _________________________________
ΠAdditionally,y, yyou can create secondaryy indexes
_________________________________
_________________________________
_________________________________
_________________________________
43
_________________________________
What We’ll Cover …
_________________________________
• Major reasons for poor query performance
_________________________________
• Monitoring queries and identifying performance bottlenecks
_________________________________
• Get queries to run faster by back-end measures and fine tuning
• Get queries to run faster by front-end measures and fine tuning _________________________________
• SAP HANA: Implementation Considerations _________________________________
• Wrap-up _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
44

Invoking BEx Analyzer _________________________________


_________________________________
• When using BEx Analyzer, instead of executing from SAP
NetWeaver BW system using transaction code “RRMX,” select _________________________________
and run it from Business Explorer menu in Windows _________________________________
ΠThis ensures better utilization of system resources
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
45
_________________________________
More Fine Tuning Measures
_________________________________
• Maximize the usage of workbooks Œ this prevents costly back-
_________________________________
and-forth trips to the server
ΠThis strategy works especially well when static results suffice, _________________________________
and so data does not have to be refreshed on a regular basis _________________________________
f When needed, refresh workbook to get latest results
_________________________________
• Minimize the usage of characteristics in rows and columns in the
Query Designer, and thereby keep your initial set of results to a _________________________________
minimum _________________________________
ΠLeverage free characteristics so that you can obtain data on
_________________________________
demand, i.e., during drill down
f Too many characteristics in rows (and thus, too few free _________________________________
characteristics) are likely to inhibit the triggering of _________________________________
aggregates
_________________________________
46

More Fine Tuning Measures (cont.) _________________________________


_________________________________
• If you do not need to do truly analytical reporting, and merely
want a flat two-dimensional result set: _________________________________
ΠUse the DataStore Object for reporting instead of the _________________________________
corresponding InfoCube,
InfoCube provided that the required information
_________________________________
is available in both
• If you are doing a certain calculation for multiple queries and _________________________________
using a formula, you should use a calculated key figure (CKF) _________________________________
instead
_________________________________
ΠIn this instance, a CKF is more efficient than a formula
_________________________________
_________________________________
_________________________________
_________________________________
47
_________________________________
More Fine Tuning Measures (cont.)
_________________________________
• Don’t forget that execution of a query is just another job and has
_________________________________
to contend with other jobs and tasks that are currently running on
your SAP NetWeaver BW server _________________________________
ΠYou need to schedule relevant queries to run in the background _________________________________
during off-peak hours
_________________________________
ΠUse the Information Broadcaster to schedule these reports/
queries _________________________________
f Before the availability of the Information Broadcaster in SAP _________________________________
BW 3.5, you had to use the Reporting Agent for this type of
scheduling
h d li _________________________________
_________________________________
_________________________________
_________________________________
48

More Fine Tuning Measures (cont.) _________________________________


_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
• Maximize your usage of filters
ΠFilters reduce the size of the result set and the number of trips _________________________________
to the database _________________________________
_________________________________
_________________________________
_________________________________
49
_________________________________
More Fine Tuning Measures (cont.)
_________________________________
• When using aggregation in calculated key figures, avoid using the
_________________________________
“Before Aggregation” option in favor of “After Aggregation” for
(Exception) Aggregation _________________________________
Œ “After Aggregation” is SAP default and generates better _________________________________
performance
_________________________________
f Do not change it if this is the correct aggregation mode

Œ “Before Aggregation” impacts performance and should be _________________________________


selected only if there’s a corresponding need _________________________________
• Usage of conditions and exceptions should be minimized because
_________________________________
they create a load on the application server
ΠAdditional back-and-forth trips between database server and _________________________________
application server increases query response time _________________________________
_________________________________
50

More Fine Tuning Measures (cont.) _________________________________


_________________________________
• If navigational attributes can provide you with the same
information that a hierarchy can, you should choose navigational _________________________________
attributes _________________________________
ΠThe system takes on a heavier load when reading hierarchies,
hierarchies
_________________________________
and this slows down query execution
• Minimize the usage of characteristics in rows and columns and _________________________________
maximize the usage of free characteristics _________________________________
ΠFor each drill-down requirement, employ characteristics as free
_________________________________
characteristics and get the results on demand
f Greater is the number of characteristics in rows and _________________________________
columns, greater is the amount of data in initial query, _________________________________
leading to bad performance
_________________________________
_________________________________
51
_________________________________
More Fine Tuning Measures (cont.)
_________________________________
• If you do not need “Results” rows, turn them off
_________________________________
ΠKeeping them on increases the query response time
_________________________________
• If you do not need formatting on your displayed results, turn
f
formatting
tti offff _________________________________
ΠWhen query has to format results, it increases response time
_________________________________
• If query involves retrieving hierarchies, try not to include all
_________________________________
nodes
ΠIncluding all nodes will be a drag on your query _________________________________
f Filter out nodes with no data _________________________________
_________________________________
_________________________________
_________________________________
52

More Fine Tuning Measures (cont.) _________________________________


_________________________________
• Minimize the number of Restrictive Key Figures (RKFs) and
Calculated Key Figures (CKFs) in your query _________________________________
ΠRKFs and CKFs created on a specific query slow down query _________________________________
execution by doing relevant calculations during query
_________________________________
execution; the more RKFs you have in a query, the slower your
query will run _________________________________
f RKFs and CKFs (if you must have them) should be created
_________________________________
on the InfoProvider
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
53
_________________________________
What We’ll Cover …
_________________________________
• Major reasons for poor query performance
_________________________________
• Monitoring queries and identifying performance bottlenecks
_________________________________
• Get queries to run faster by back-end measures and fine tuning
• Get queries to run faster by front-end measures and fine tuning _________________________________
• SAP HANA: Implementation Considerations _________________________________
• Wrap-up _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
54

What Is SAP HANA? _________________________________


_________________________________
• SAP HANA stands for High Performance Analytics Appliance and
represents a convergence of multiple technologies _________________________________
ΠIn-memory computing _________________________________
ΠCombines
C bi OLAP andd OLTP capabilities
biliti _________________________________
ΠStores data in both row and columnar formats
_________________________________
ΠAdvanced data compression

ΠReal-time reporting capabilities


_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
55
_________________________________
How Does SAP HANA Manifest Itself in BW?
_________________________________
• Faster query performance
_________________________________
• Shorter data load times
_________________________________
• Planning models work more efficiently because of faster in-
memory calculations
l l ti _________________________________
• InfoCube remodeling is much faster _________________________________
• Sybase replication engine ensures that data is “replicated” in BW
_________________________________
in real time
• Reduction in back-end maintenance (as was the case with BWA) _________________________________
because no index creation or statistics maintenance is required
q _________________________________
_________________________________
_________________________________
_________________________________
56

SAP HANA and SAP NetWeaver BW 7.3 _________________________________


_________________________________
• With release of SP3 of SAP HANA in November ‘11 (ramp-up), any
SAP NetWeaver BW 7.3 data warehouse can be migrated to HANA _________________________________
ΠYou will thus be able to fully leverage the power of HANA _________________________________
f In
I contrast
t t with
ith BWA,
BWA allll your BW data
d t will
ill now be
b loaded
l d d _________________________________
(in-memory) to SAP HANA appliance
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
57
_________________________________
Considerations for Implementing SAP HANA
_________________________________
• You should consider the following in determining whether your
_________________________________
organization is ready for SAP HANA:
ΠCost _________________________________
f In
I particular,
ti l ttry to
t gett a deep
d understanding
d t di off license
li costs
t _________________________________
ΠBusiness drivers
_________________________________
ΠHardware
_________________________________
ΠOrganizational BI and ERP strategy/roadmap

f E.g., Is migrating your ERP to SAP HANA part of your


_________________________________
roadmap? _________________________________
_________________________________
_________________________________
_________________________________
58

What We’ll Cover … _________________________________


_________________________________
• Major reasons for poor query performance
• Monitoring queries and identifying performance bottlenecks _________________________________
• Get queries to run faster by back-end measures and fine tuning _________________________________
• Get queries to run faster by front-end measures and fine tuning _________________________________
• SAP HANA: Implementation Considerations
_________________________________
• Wrap-up
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
59
_________________________________
Additional Resources
_________________________________
• Articles found at www.bi-expertonline.com
_________________________________
Œ Gary Nolan, “Help Your Queries Run More Quickly Using the
OLAP Cache” (BI Expert, November 2004). _________________________________
ΠCatherine
C th i Roze,
R “24 BW Design
D i andd Data
D t Modeling
M d li Tips
Ti for
f _________________________________
Optimal ETL” (BI Expert, October 2003).
_________________________________
Œ Gary Nolan, “Better Star Schema Design Means Better
Performance,” (BI Expert, September 2004). _________________________________
Œ Prakash Darji, “How SAP NetWeaver BW Running on HANA _________________________________
Changes Business Processes” (BI Expert, December 2011).
_________________________________
Œ Jonathan Haun, “Implementing SAP HANA: Experiences and
First Impressions” (BI Expert, February 2012). _________________________________
_________________________________
_________________________________
60

Additional Resources (cont.) _________________________________


_________________________________
• Dr. Thomas Becker and Alexander Peter, “BW Performance
Tuning” (SAP Community Network, May 2003). _________________________________
Πwww.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ccc _________________________________
ad390 0201 0010 5093 fd9ec8157802
ad390-0201-0010-5093-fd9ec8157802
_________________________________
• BI Discussion Forums on at the SAP SDN site via
www.sdn.sap.com _________________________________
ΠForums _________________________________
f SAP NetWeaver BW at http://scn.sap.com/community/data-
_________________________________
warehousing/netweaver-bw
f BW Business Content and Extractors at http://scn.sap.com/
_________________________________
community/data-warehousing/business-content-and- _________________________________
extractors
_________________________________
_________________________________
61
_________________________________
7 Key Points to Take Home
_________________________________
• Good query performance is one of the key determinants of the
_________________________________
success of any BI/BW project
• Queries that take an unacceptable time to run cause loss of _________________________________
productivity are a nuisance
productivity, nuisance, create an unfavorable perception of _________________________________
the robustness of the software among key decision makers, and
translates into a sub-optimal ROI _________________________________
• SAP provides numerous tools and techniques to regularly monitor _________________________________
queries and collect statistics on them
_________________________________
• When several queries running off the same InfoProvider suffer
f
from poor performance,
f you need d tto look
l k att the
th underlying
d l i data
d t _________________________________
model _________________________________
_________________________________
_________________________________
62

7 Key Points to Take Home (cont.) _________________________________


_________________________________
• By utilizing back-end tools, such as aggregates, partitioning,
OLAP Cache, etc., you can fine tune queries _________________________________
• There are numerous ways, on the front end, that can make your _________________________________
slow running queries run faster
_________________________________
• Understand the exciting capabilities of SAP HANA, but thoroughly
evaluate whether your enterprise is ready for it _________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
63
_________________________________
Your Turn!
_________________________________
_________________________________

How to contact me: _________________________________


A
Anurag Barua
B _________________________________
anurag.barua@gmail.com _________________________________
_________________________________
_________________________________
_________________________________
Continue the conversation! Post your
questions in the BI-BW Forum on _________________________________
Insider Learning Network* _________________________________
_________________________________
*bit.ly/BI-BWForum
64

Disclaimer _________________________________

SAP, R/3, mySAP, mySAP.com, SAP NetWeaver®, Duet®, PartnerEdge, 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. Wellesley Information Services is neither owned nor controlled by
SAP.
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
_________________________________
65
 

  

Wellesley Information Services, 20 Carematrix Drive, Dedham, MA 02026


Copyright © 2012 Wellesley Information Services. All rights reserved.

You might also like