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

sql trace

Former Member
0 Likes
639

dear all,

the sql trace ( st05) in SAP shows different execution time values when i run the query at different times. Is the execution time shown dependent on the network load? and what does all the fields of sql trace output mean?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

If you want to compare performance for different selects, the best tool is the 'explain' function in the trace. Put your cursor on a line in the trace doing an 'open' and then press the explain button. The estimated cost should remain constant for identical selects under different network loads.

Rob

4 REPLIES 4
Read only

Former Member
0 Likes
616

Hi Prabaharan,

Database access times higher at certain times can be generated by throughput problems in the network.

Please do not forget to run the application at least once before starting the measurement, in order to fill the buffers.

I do not know whether I understood the second question rightly, but here are some field descriptions:

Columns in SQL trace:

Duration - SQL statement runtime in microseconds

Object - DB table or view name

Oper - operation executed (e.g. open, fetch)

Rec - number of records read from the DB

RC - database specific return code

Statement: - short form of SQL statement

hh:mm:ss.ms - time stamp

Program - program generating the SQL statements

Curs - database cursor number

The above given info is taken from ''SAP Performance Optimization Guide' (ISBN 1-59229-022-1).

Hope this helps,

Ferenc

Read only

Former Member
0 Likes
617

If you want to compare performance for different selects, the best tool is the 'explain' function in the trace. Put your cursor on a line in the trace doing an 'open' and then press the explain button. The estimated cost should remain constant for identical selects under different network loads.

Rob

Read only

Former Member
0 Likes
616

Hi, the execution time varies depending upon the server load and the buffer. To have an idle execution time, better log off and then execute. As whenever the program is first executed, there would be no buffer and I think we can consider this time to be the idle time . From the second execution onwards, as the buffer would be already available, the time would be less than the first time execution. Hope this helps.

Read only

Former Member
0 Likes
616

Answers were useful