‎2006 Mar 22 2:53 PM
Hi all,
I am trying to analyze the performance the of sql statement in se38 program. I placed the breakpoint at the select statement. then in another session I activated the trace in st05. After the select statementis executed I deactivated the trace and clicked on analyze trace. I can see list of statements but I do not understand how to find out the runtime of this statement and how expensive it is.
I know how to do it with se30 and tips and tricks. I just wan to know how to do with st05.
I am forwarding the code too.
REPORT ZSELECTDEMO.
tables sflight.
data : itab like sflight occurs 0 with header line.
select * from sflight .
itab-carrid = sflight-carrid.
itab-connid = sflight-connid.
itab-fldate = sflight-fldate.
append itab.
clear itab.
endselect.
loop at itab.
write 😕 itab-carrid,itab-connid,itab-fldate.
endloop.
Please help with this.
Regards,
Varun.
‎2006 Mar 22 3:01 PM
Hi varun,
in the list of statements, position the cursor on a SELECT statement (those are native SQL statement!) and click the button Explain. you will see the extimated cost of the statement and the extimated rows extracted.
I think ST05 is very useful if you want yo check which index is used for a given sql statement.
Try to run transaction ST03N. There are runtime and DB statistics for every sql statements
Regards, Manuel
‎2006 Mar 22 3:01 PM
Hi varun,
in the list of statements, position the cursor on a SELECT statement (those are native SQL statement!) and click the button Explain. you will see the extimated cost of the statement and the extimated rows extracted.
I think ST05 is very useful if you want yo check which index is used for a given sql statement.
Try to run transaction ST03N. There are runtime and DB statistics for every sql statements
Regards, Manuel
‎2006 Mar 22 3:10 PM
Hi Manuel,
I did the same way you have explained me, I got the result as estimated cost = 1, Estimated # Rows = 81. But what information can I infer from this ? How do I know wether this select statement is epensive or not ?
Regards,
Varun.
‎2006 Mar 22 3:22 PM
Hi,
Those values are estimated from the SQL optimizer (based on DB statistics).
The real execution time is the field "Duration" in the main list.
Regards, Manuel