0% found this document useful (0 votes)
77 views4 pages

SAP Performance Optimization

The document discusses various performance increase techniques for ABAP programs including database access optimization, parallel processing, performance tracing, and indexing/partitioning. Database access optimization includes using efficient SELECT statements and joins. Parallel processing uses parallel cursors to improve performance of nested loops. Performance tracing allows recording and analyzing system activities. Indexing and partitioning tables can enhance data retrieval speed.

Uploaded by

Pawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views4 pages

SAP Performance Optimization

The document discusses various performance increase techniques for ABAP programs including database access optimization, parallel processing, performance tracing, and indexing/partitioning. Database access optimization includes using efficient SELECT statements and joins. Parallel processing uses parallel cursors to improve performance of nested loops. Performance tracing allows recording and analyzing system activities. Indexing and partitioning tables can enhance data retrieval speed.

Uploaded by

Pawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Performance Increase Techniques

What is Performance Increase Techniques?


Ans- The Performance Trace allows you to record database access, locking activities, remote
calls of reports and transactions, and table buffer calls from the SAP system in a trace file and to
display the performance log as a list. The Performance Trace additionally offers wide support
when analyzing individual trace records in detail. By using performance increase techniques we
can enhance the runtime of ABAP program, improve the user experience and maximize system
resource.

Types of Performance Increase Techniques?


1. Database access optimization and coding techniques
2. Parallel Processing
3. Performance Trace
4. Indexing and Table Partitioning
Explanation-
1. Database access optimization and coding techniques-
- SELECT field sequentially in SELECT QUERY. While using WHERE clause in SELECT
statement to restrict the volume of data retrieved.
- Use JOIN in SELECT QUERY if want to join two or more tables
(Note- Join two or three tables using INNER JOIN; if you join more than three tables,
use FOR ALL Entries instead of inner join)
- Avoid using SLECTE * and SELECT only required field from the table
- Avoiding nested loops, reducing unnecessary calculations and data processing,
optimizing string operations and memory usage
(Note- Whenever you are dealing with large internal tables, use binary search or hash
search)
- For modification use Field-Symbol instead of using modify statement. In case of any
modification in the internal table generally we loop the internal table to workarea and
we have to modify in workarea and need to write the modify statement to modify
internal table. If we use Filed-Symbol then automatic modification can be done without
modify statement.

1 By- Payal Patel


- Example-
Data: Var type I value 2.
Field-Symbol: <Fs_num> type I.
Assign Var to <Fs_num>
Write: / <Fs_num>
<Fs_num> = 4
Write: /Var

Output – 2,4

2. Parallel Processing-
- Parallel cursor is a technique to increase the performance of the program when there
are nested loops
- Example- Algorithm
Loop at IT into WA
Loop at IT1 into WA1
----------
----------
Endloop
Endloop
(Note – In above logic for one record of the IT, again the table IT1 loops execute many
times and Vice Versa this would result into performance issue)

- To overcome this time complexity we are going for parallel processing


- Let see how parallel processing will work with example
- Example- Algorithm
Loop at IT into WA
Read table IT1 into WA1 with key field1 = WA-Field1
V_tabix = Sy-tabix
If Sy-Subrc eq 0.
Loop at IT1 into WA1 from V_tabix
// will loop from that index which contain in first loop
Endloop
Endloop
(Note – In above logic for one record of the IT, IT1 loop trigger only once and vice versa
this would result into increase performance)

2 By- Payal Patel


3. Performance Trace and runtime analysis –
- AS mention on first page -- The performance trace allows you to record database
access, locking activities, remote calls of reports and transactions and table buffer call
from the SAP system in a trace file and to display the performance log as a list.
- Transaction code used
a) ST05 – Performance Trace
b) SE30 - Runtime analysis transaction
c) SAT - Runtime analysis transaction (Advanced version of SE30)
d) ST12 - Combination of (ST05 + SAT)

Comparison of ST12 with ST05 trace


ST12 ST05

Traces only a specific user context or a Traces every action of a user on a


transaction server

ST12 trace automatically turns off with a ST05 trace has to be manually turned
transaction off

Stores the trace into database and is Stores the trace into local files and
permanent overwritten regularly

Provides a Top-Down flow used to find Provides a bottom-up flow which is


performance hotspot, issues identified by suitable for identifying DB bound
which are usually solved by code changes. performance issues, which are usually
solved by Performance Tuning.

3 By- Payal Patel


- Types of Performance Trace-
a) SQL Trace
b) Table Buffer Trace
c) Enqueue Trace
d) RFC Trace

- Explanation-
a) SQL Trace-
The SQL Trace which is part of the performance trace, is the most important
tool to test the performance of the database.
This allows you to monitor the database access of reports and transaction.

b) Buffer Trace-
With buffer trace, we can monitor access mode to the table buffer and how it is
loaded or invalidated.
The buffer trace records are displayed summarized.

c) Enqueue Trace-
The Enqueue trace allows you to track the locking and unlocking statement that
your application or SAP system uses and the locking object and parameters to
which they apply.

d) RFC Trace-
Using RFC trace, you can track which remote calls your application or the SAP
system triggers and on which instance these calls are executed.

4. Performance Trace and runtime analysis –


- Defining indexes and partitioning schemes can significantly enhance data retrieval and
manipulation speed
- We can create appropriate indexes to reduce query execution time
- Table partitioning based on specific criteria, such as date, range or specific values can
optimize data retrieval and improve performance

4 By- Payal Patel

You might also like