In ST05, click the "Activate Trace with Filter" button:
Enter your user id and the name of the report/transaction. This is so that we can try to limit the records in the trace. If you want to trace another user, simply enter their user id:
Now in a separate session (preferably) run the transaction/program with the performance problem.
Once you have experienced the problem, you can go back into ST05 and click "Disable Trace" (by default it will remember the trace details and disable the running trace, you won't need to re-enter all the details):

Still within ST05, click "Display Trace":

The system remembers the last trace recorded and should automatically populate the details, but you can always enter them for date/time, user id etc:

The SQL trace records are displayed.
The poor performing SQL has it's time (duration) in microseconds (millionths of a second) highlighted in red if it exceeds 10000 microseconds, 10 milliseconds or 0.01 seconds:
(1 second = 1000 milliseconds = 1000000 microseconds)

You can settle issues related to expensive SQL statements with the help of ABAP’rs
EmoticonEmoticon