7 Replies Latest reply: Feb 29, 2012 11:23 AM by Pavan Valluri RSS

ST05

Raja Ram
Currently Being Moderated

Hi Experts

 

     Can anyone tell me how to work on ST05 and analysis the performance of the report.

 

     Can we know the particular query or particular coding part takes how much time in the report.

 

      Please explain me clearly.

 

Regards

Rajaram

  • Re: ST05
    ABAP Fresher
    Currently Being Moderated

    st05 is basically for sql trace

    it tells u the time for selecting fetching the database

    use the tcode

    and then activate trace

    after that in the new session

    use ur program or tcode

    then after that

    use display trace

    it wil display the all the tables and the time spent to fetch the records

  • Re: ST05
    Samson Rodrigues
    Currently Being Moderated

    Hi,

     

    In ST05, You need to click on ACTIVATE Trace, then run the program conatining

    the code that u wish to analyze.

     

    when the program has finished executing, u need to go back to ST05 and

    DEACTIVATE Trace,

     

    After this u can Click the Display Trace button to view the details of the execution

    in the screen u can see the time each query took, etc.

     

    Regards,

    Samson Rodrigues.

  • Re: ST05
    Atish Sarda
    Currently Being Moderated
  • Re: ST05
    Narendran Muthukumaran
    Currently Being Moderated

    Hi,

     

    In the SQL trace..Check the cost estimates..if the cost estimates is high then the SQL is not using any index..

     

    In the sql trace..check if the SQL is using the index..

     

     

    Thanks

    Naren

  • Re: ST05
    R P
    Currently Being Moderated

    Hi,

     

      ST05 transaction t start the trace and run your program .

      Deactivate the trace in ST05 and display the trace.

     

    Reward if useful.

  • Re: ST05
    Kris Donald
    Currently Being Moderated

    To find out how much time a report takes use transaction SE30

     

    To find out how much time a particular part of code takes, use this code

     

    data : a type i,
    b type i,
    c type i.
    
    get run time field a.
    
    " do all processing
    get run time field b.
    
    c = b - a.
    
    write:/ c. "-> look at C value ( Micro seconds)

     

  • Re: ST05
    Pavan Valluri
    Currently Being Moderated

    Hi

     

    SQL trace

    SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05

    to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05

    and click on list trace to view the details.

     

    You can also perform traces on other items such as authorisation objects.

    Authorisation trace analysis 1. Open two sessions

    2. Execute transaction ST01 in one of the sessions

    3. Select the authorisation checkbox, note the other traces

    you can perform (SQL, RFC, Table Buffer etc)

    4. Click the 'Trace On' button

    5. Within your other session execte the transaction/report

    you want to trace or get the user in question to do it

    6. Return to the session where you turned the trace on and

    click on 'Trace Off' otherwise it will continue to record

    all athorisation checks

    7. Click on the 'Analysis' button

    8. Enter appropriate data into selection screen such as

    Username, type of trace records (i.e. Authorization check)

    9. Click on the Execute button.

    10. Report displaying trace results will now be displayed

     

     

     

    Some useful transaction related to this are ..

     

    ST01 SAP system trace

    ST02 Buffer statistics.

    ST03 Workload analysis.

    ST04 Database performance analysis.

    ST05 SQL trace .

    ST06 Operating system monitor ...

     

    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

     

    Use

     

    The Performance Trace allows you to record database access, locking activities, and remote calls of reports and transactions in a trace file and to display the performance log as a list. It also provides extensive support for analyzing individual trace records.

     

    SQL Trace: This allows you to monitor the database access of reports and transactions.

    Enqueue Trace: This allows you to monitor the locking system.

    RFC Trace: This provides information about Remote Function Calls between instances.

     

    While the trace is switched on, the SQL Trace function records all database activity by a particular user or group of users. The R/3 System takes OPEN SQL statements and converts them in to embedded SQL statements that it passes to the database. It is the embedded SQL statements, their parameters, return codes, and the number of entries retrieved, inserted, or deleted that are recorded in the SQL Trace file. The log file also contains the runtime of the statement and the place in the application program from which it was called.

     

     

     

    The SQL trace tells you:

     

    The SQL statements executed by your program.

    The values that the system uses for particular database access and changes.

    How the system converts ABAP Open SQL statements (such as SELECT) into Standard SQL statements.

    Where your application executes COMMITs.

    Where your application repeats the same database access.

    The database accesses and changes that occur in the update part of your application.

     

     

    Regards

    Pavan

     

Actions