Perform A Structured SQL Performance Analysis
Perform A Structured SQL Performance Analysis
Log on to the application server ZME on Sybase with system ID ZME. Open class
CL_HA400_CI_PERFORMANCE_ISSUES and analyze the coding.
1. Open class CL_HA400_CI_PERFORMANCE_ISSUES.
a) Start the ABAP Workbench (for example using transaction code SE80).
b) Choose Repository Browser if it is not chosen yet.
c) Choose the Class object category.
d) Enter the class name as the object name and press Enter.
e) Double-click the class.
b) Check the reported errors. To navigate to the ABAP source code, double-click the
message.
How many SAP HANA-relevant performance errors does the check find and in which
methods?
There are three performance errors in methods get_days_ahead_for_customer
and get_days_ahead_for_agencies.
What information is missing for prioritizing the performance errors?
How often the different methods are actually executed in the productive
system, in particular, how often import parameter iv_with_days is set to
abap_true.
e) In the Object name field, enter the name of the class and choose Execute (F8).
2. Find the statement with the maximum consumption of database time.
a) Sort the list descending by column Total DB time.
Which SQL statement has consumed the maximum database time?
A SELECT from table SBOOK.
Which processing block contains this statement?
Method get_days_ahead_for_customer.
5. Analyze the static and SQL Monitor findings for the various SQL statements of
class CL_HA400_CI_PERFORMANCE_ISSUES. Start with the finding with the
maximum DB time.
a) In the Result Overview, make sure the results are ordered by column Total DB
time.
b) Click on the SQL statement with the largest value in the Total DB time column.
c) Analyze the entries in SQL Monitor Results and Static Check Findings.
How often has the statement been executed?
Several hundred thousand times.
What can you do to reduce the DB time consumption?
Avoid the repeated single record accesses and get rid of the SELECT * in this
statement.