how to know if there are expensive sql statements
running?what will you do then to improve the response time?

Answer Posted / yash

• Detection of Expensive SQL Statements Using the
Transaction Profile and the Statistical Records:
o Using the ST03N transaction profile, you can
identify transactions that cause a significant part of
total response time, as well as transactions with high
database request times. Use of the Transaction Profile:
 Sort the Average DB time (ms) column in descending
order. Transactions with high average DB request times
might be caused by expensive SQL statements.
 Sort the Total Database Time column in ascending
order. Then Total this column. Transactions causing more
than 5% of this total database time are worth a closer look
with respect to tuning measures. .
 Sort the Total Response Time column in ascending
order. Then Total this column. Transactions causing more
than 5% of this total response time are worth a closer look
with respect to tuning measures.
o Use Statistical Records (STAD):
 On the transaction STAD entry screen, enter the
following restrictions:
• Choose a time frame (remember that statistical
records are only available for a certain time).
• Select Task Type D.
• Enter a relevant value for DB request time, for
example, 1000 ms.
 Analyze all available data for long-running dialog
steps by double-clicking individual entries in the result
list.
o Using the Database Monitor:
 On the entry screen of the database monitor you
should check the following values: .
• The quality of the database data buffer should be
higher than 95%. During .warming up. of the SAP system the
quality may be lower, but should still be above 90% (except
during a very early phase).
• Check the number of user calls compared to
recursive calls. There should be less recursive calls than
user calls.
• Check the Reads/User Call. If this value exceeds 30
(blocks read per user call) then this is a strong indicator
for expensive SQL statements.
 Use the Database Process Monitor:
• Enter transaction ST04 and then choose Detailed
Analysis Menu → Oracle Session. .
• Identify the long-running task by finding the
corresponding workprocess ID. Compare the first value in
the Client PID column with the process ID of a work process
in SM50/SM66. Alternately, you can use the link to the work
process information by choosing Process after having marked
one line in the Oracle process overview. .
• Check the current action on the database by
clicking the statement in the SQL statement column. In the
resulting popup window, you will see the following options:
o 1. Dictionary information on the accessed object
o 2. The display of the execution plan for the SQL
statement (also called Explain)
o 3. A reference to the call point in the ABAP
program (if possible) .
• Analyze the Explain

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do? If another user wants to share that lock but the user using that

1545


what is the common storage file for oracle ?

1900


If job is slow?

1559


How do you check the installed software components and product versions on sap system?

818


What is client administration in sap system? Why do we use multiple clients in sap system?

974


how would you troubleshoot the 'user can not print'?

829


How to create RFC CONNECTION between production server and Global trade system. what prerequsite we need for this.

3427


Explain deletion flag?

906


can u explain step by step procedure of DB REFRESH..Ravi

3513


You want to find out which users have an access to a particulat transaction. How would you do that?

889


Hi i am Ramesh want to know that which course in sap is most suitable for my younger brother who has BSC qualification and is this course is job oriented

1842


How to apply job on OS Level?

1543


Does any one have SAP basis B1 Resume format for 4 to 5 year experience? if any one have please send me on kishorekharche@gmail.com

1243


If you have a long-running Job, how do you analyse?

933


Explain how client refresh is different than client copy?

897