Start of Content Area

 Procedure documentation The Function Execute Explain for SQL Statements  Locate the document in its SAP Library structure

The function Execute Explain for SQL Statements allows you to analyze the database strategy used to access any given table or view defined in the ABAP Dictionary or in the database itself. You can use this analysis to identify the indexes used for database access. You can explain a specific SQL statement in two different ways.

·        From the initial screen of the performance trace, you can check a statement without creating a trace file.

·        From the list display of a trace file, you can select a Dictionary table and get details on the access method.
See also Analyzing Trace Records

Note

Note that the result of the Explain for SQL Statement function are database-specific. This concerns both the SQL statement and the operation. With some DB systems, Explain for SQL Statement can only be executed for the SELECT statement. To be able to understand the results, you require sound knowledge of the relevant database system. You should refer to the manuals provided by the manufacturer of the database system you are using.

Analyzing an SQL Statement without a Trace File

To retrieve an analysis of an SQL trace without creating a trace file, proceed as follows:

...

       1.      On the Performance Trace initial screen, choose Enter SQL Statement.
The system starts an editor with which you can enter an SQL statement. You can also load an SQL statement from an internal table or local file or save it in one.

       2.      Enter an SQL statement.

This graphic is explained in the accompanying text

       3.      Choose Explain.

The system examines the statement and displays information about the database's access strategy.

 

This graphic is explained in the accompanying text

 

End of Content Area