Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performance

Former Member
0 Likes
804

Hi,

What is the difference between SQL trace && Runtime analysis ?

Can you please give an idea between the two with some points?

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
761

hii

T.Code <b>SE30</b> <b>Run time analysis</b>

This runtime analysis tools allows the ABAP/4 programmer to trace the tables used by the SAP dialog/reports programs .

In the Analyze button, you can see four more buttons like:-

Hit List

Displays the execution time of each statement in the program.

Tables

Displays the tables accessed during run time.

Group hit list

Displays the execution time of all the statements and grouping them based on the type of command. e.g. performs, SQL and internal tables used.

There are three bargraphs: ABAP / database / system.

System should be more or less nothing.

If ABAP is bigger than database: have a look at slow abap-statements (normally operations with internal tables: read, delete, loop where,...); classic reason: to much reads without binary search / sorted table / hashed table use.

If database is bigger than ABAP: have a look at your SQL statements. If you can see already forgotten key fields, fine - otherwise SQL trace will bring help in analyzing.

<b>The SQL trace helps you to find,

1. Database read that is taking more time

2. The recurrsive database calls

3. The cost per database read

4. Index used by a particular select statement</b>

Check these links

<b>http://www.intelligententerprise.com/channels/applications/feature/archive/janssen.jhtml

http://www.sap-basis-abap.com/sapta002.htm

http://www.sappress.de/download/dateien/637/sappress_enhancing_quality_abap.pdf</b>;

Regards

Naresh

6 REPLIES 6
Read only

Former Member
0 Likes
761

hi,

chek out this:

http://www.sappoint.com/faq/faqsql.pdf

The SQL Trace part of the Performance Trace tool allows you to see how the OPEN SQL statements that you use in ABAP programs are converted to standard SQL statements (see Embedded SQL) and the parameters with which the embedded SQL statements are passed to the database system.

The runtime analysis provides an overview of the duration and performance of your source code, from individual statements up to complete transactions.

Choose Menu ® Test ® Runtime Analysis or transaction SE30 to start the runtime analysis. In the initial screen, you see the four main functions of this tool, which can be activated by pushing the corresponding button.

· Measurement in dialog status

· Measurement of external session

· Selection of measurement restrictions

· Evaluation of measurement results

With large applications, it is advisable to first analyze the entire application and then check details in the hit lists

Overview

From the time you turn on the trace function to the time you turn it off again, all database activity occurring either for a specific user or for an entire system is recorded. The SAP System takes OPEN SQL statements and converts them in to embedded SQL statements that it passes to the database and makes the results available. The embedded SQL statement and its parameters are recorded in the SQL Trace file. The results of the SQL statement, like return code, number of entries retrieved, inserted, or deleted by the database are recorded in the SQL Trace file as well. The log file also contains the runtime of the statement and the place in the application program, respectively transaction, from which it was called which enables additional analyses (supported by the SQL Trace function).

From the recorded SQL trace you can deduce:

· which SQL statements your application carries out

· which values the system uses for specific database accesses and changes

· how the system translates ABAP OPEN SQL commands (such as SELECT) into standard SQL commands

· where your application positions COMMIT statements

· where your application makes repeated database accesses

· what database accesses or changes occur in the update section of your application

regards,

keerthi.

Read only

Former Member
0 Likes
762

hii

T.Code <b>SE30</b> <b>Run time analysis</b>

This runtime analysis tools allows the ABAP/4 programmer to trace the tables used by the SAP dialog/reports programs .

In the Analyze button, you can see four more buttons like:-

Hit List

Displays the execution time of each statement in the program.

Tables

Displays the tables accessed during run time.

Group hit list

Displays the execution time of all the statements and grouping them based on the type of command. e.g. performs, SQL and internal tables used.

There are three bargraphs: ABAP / database / system.

System should be more or less nothing.

If ABAP is bigger than database: have a look at slow abap-statements (normally operations with internal tables: read, delete, loop where,...); classic reason: to much reads without binary search / sorted table / hashed table use.

If database is bigger than ABAP: have a look at your SQL statements. If you can see already forgotten key fields, fine - otherwise SQL trace will bring help in analyzing.

<b>The SQL trace helps you to find,

1. Database read that is taking more time

2. The recurrsive database calls

3. The cost per database read

4. Index used by a particular select statement</b>

Check these links

<b>http://www.intelligententerprise.com/channels/applications/feature/archive/janssen.jhtml

http://www.sap-basis-abap.com/sapta002.htm

http://www.sappress.de/download/dateien/637/sappress_enhancing_quality_abap.pdf</b>;

Regards

Naresh

Read only

Former Member
0 Likes
761

hi

chk this out

really helpful link to ansewr ur doubts !!

<b>

<b>plz reward if useful</b>

Read only

Former Member
0 Likes
761

Reson,

SQL Trace, this will tell you which tables has been hit and also will give time take for each SQL hit. (ST05)

Runtime Analysis, this will generally give you the analysis performance of the program. (SE30)

Regards,

Ravi

Note :Please mark the helpful answers

Read only

abdul_hakim
Active Contributor
0 Likes
761

hi reson,

<b>Runtime Analysis:</b>

Will give an overview of the time taken by your program at the application server and database server level in micro seconds and also with an excellent barchart.

<b>SQL Trace:</b>

Only give the time taken by ur individual SELECT clause to execute.

Cheers,

Abdul Hakim

Mark all useful answers..

Read only

Former Member
0 Likes
761

SQL Trace's main intention is to find the tables updated and the time taken for each operation on the database.

Where as Run time analysis aims at diagnosing the reasons for the slowness/fastness of the program by analysing the different times taken for ABAP statements and the Statements affecting the database. IN the process it also tells you what are the tables that are being hit(For modification/reading).

REgards,

Ravi