SD 10 Trace Performance

Embed Size (px)

Citation preview

  • 8/7/2019 SD 10 Trace Performance

    1/7

    1. Fazendo um trace de uma transaoVia Menus IMG

    Resumo do Processo

    Execute a transao ST05 ou faa o caminho acima especificado para ligar o trace.Abrir uma outra janela no mesmo usurio para se fazer o trace.

    Dicas

  • 8/7/2019 SD 10 Trace Performance

    2/7

    2. Iniciando o processo de TraceVia Menus IMG

    Resumo do Processo

    Aps abrir uma outra janela para executar a transao desejada, clicar em trace on para iniciar o processo de analise deperformance.

    Dicas

  • 8/7/2019 SD 10 Trace Performance

    3/7

    3. desativando a analise de performanceVia Menus IMG

    Resumo do Processo

    Aps a execuo da transao em outra seo do mesmo usurio, clicar em trace OFF para interromper o processo de gravaodos dados para analise da performance.

    Dicas

  • 8/7/2019 SD 10 Trace Performance

    4/7

    4. Consultando o arquivo de performance ( Trace )Via Menus IMG

    Resumo do Processo

    Para visualizar o arquivo de trace, clique em List Trace

    Dicas

    Existem duas opes de visualizao a Lista Basica e mais completa

  • 8/7/2019 SD 10 Trace Performance

    5/7

    5. Analisando o trace......Via Menus IMG

    Resumo do Processo

    Neste exemplo, executamos uma transao de consultas de estoque a transao MMBE.

    Dicas

    Clicando duplamente na tela de analise, possvel verificar os dados do programa, da tabela e do comando SQL dado paramanusear os dados de tabelas ( causa principal para problemas de performance..).

    Analyzing a Sample SQL Data File

  • 8/7/2019 SD 10 Trace Performance

    6/7

    When you create an SQL trace file for an application, you can see exactly how the system handlesdatabase requests. In a sample application, a report reads and later changes records on the ABAPDictionary table SFLIGHT using ABAP Open SQL statements. Since the table SBOOK is notbuffered, the system first needs to access the database to retrieve the records. In the sectionsbelow, the data file from the sample application is examined.

    Read AccessThe first screen of the SQL Trace data file displays each measured database request theapplication made. The trace file records when the request occurred and its duration. The ABAPDictionary table involved in the request is also listed.A trace file for a read access of the table SFLIGHT might look like this:

    The system measured several database operations involved in retrieving records from SFLIGHT:

    Operation Function

    PREPARE Prepares the OPEN statement for use and determines the data access method. Since anactive cursor with the number 18 is available in the work process's cursor cache, thesystem does not perform a DECLARE operation. However, the system must prepare theSELECT statement that is used to read the table SFLIGHT.The system does not issue the field 'MANDT' and 'CARRID' in the SELECT statement avalue at this point but instead gives it a database-specific marker.

    OPEN Opens the cursor and specifies the selection result by filling the selection fields withconcrete values. In the case of this example, the field 'MANDT' receives the value '000' andthe field 'CARRID' receives the value 'LH'. The OPEN operation then creates a set ofretrieved records in the database.

    FETCH Moves the cursor through the dataset created by the OPEN operation. The array size

    displayed beside the fetch data means that the system can transfer a maximum packagesize of 392 records at one time into the buffered area. The system allocates this space onthe application server for the SFLIGHT table.In the above example, the first FETCH retrieves the maximum number of records from thedataset. Then, the FETCH transfers these records to the program interface.

    Write AccessAn example SQL data file analyzing a request that changes data in the Table D010SINF might looklike this:

    The example shows the system inserting new records into the table (INSERT). As in the first example, where

    the system carried out a read-only access, the system needs to prepare the database operations (PREPARE)that change the database records. The PREPARE precedes the other operations.

    Measured Database Operations

  • 8/7/2019 SD 10 Trace Performance

    7/7

    Each SQL statement is broken down into database operations by the R/3 System. The SQL Traceallows you to measure the runtime of each of these operations:

    DECLARE Defines a new cursor within an SAP work process and assigns the SQLstatement to it. The short form of the statement is displayed in the list of tracerecords. The cursor has a unique cursor ID, which is used in communication

    between the R/3 System and the database system.PREPARE Converts the SQL statement and determines the execution plan.

    OPEN Opens a cursor for a prepared (converted) SELECT statement. OPEN passesthe parameters for the database access. It is only used with SELECTstatements.

    FETCH Passes one or more records selected in the SELECT statement to the databaseinterface of the R/3 System. The data records are identified by the cursor ID.

    REOPEN Reopens a cursor prepared by the system for a previous SELECT statementand passes a new set of parameters to the database.

    EXEC Passes the parameters for the database statement, and executes thestatements that change data in the database (such as UPDATE, DELETE, orINSERT).

    REEXEC Reopens a cursor prepared by the system for a previous EXEC statement.