The following procedure is for developers. If you have the role of an administrator, see Tracing SQL Activities for Administrators.
During developing and operating applications on your ABAP environment, these situations are typical when you take an SQL trace of your ABAP application and turn to the SQL trace analysis:
-
You want to analyze the performance of the SQL statements of your ABAP application in the sequence as they run.
-
When analyzing the performance of an ABAP application, you want to clarify whether the SQL activity of the application is a relevant contribution to the processing time.
If you're familiar with on-premise products from SAP and know the SAP GUI transaction ST05 (performance trace), you'll be happy to see that the SQL trace functions described in the following procedure are similar to what you know from the SQL trace in transaction ST05.
-
Take an SQL trace of your ABAP application using ABAP development tools for Eclipse (ADT):
-
On the Trace Directory tab page of the SQL trace analysis, choose the new trace you just took.
The default view shows you all SQL traces taken by your ABAP user in the last 24 hours.
The concept of the SQL Trace Analysis app is: With each move to a tab page to the right, you get more information about what you've selected on the previous tab pages to the left.
-
Choose the trace that you want to look at and change to the Trace Records tab page.
-
On the Trace Records tab page, single out expensive or otherwise interesting SQL statements.
By default, you see all trace records in chronological order. However, you can apply filter conditions, for example, on the SQL statement text, or sort the entries by duration to put the longer running statements to the top of the list. Note that you can display additional columns that aren't shown by default by choosing Characteristics or Metrics.
To go further into detail from here, you have three options on the following three tab pages to the right (SQL Statement, Prepared Plan, Executed Plan), which are mostly independent of each other. You can, for example, jump from here directly to the calculation of an executed access plan for your statement.
-
Choose the SQL Statement tab page to get a decent view of your selected SQL statement, pretty-printed and with syntax highlighting.
The Application Source Position field shows you the ABAP code location (if available) where the SQL statement originates from. You can choose one of theShow ABAP Source in … buttons to display the ABAP source in the web browser or in ABAP Development Tools.
-
Choose the Prepared Plan tab page to display and analyze a newly calculated prepared access plan for your SQL statement.
-
Choose the Executed Plan tab page to display and analyze a newly calculated executed access plan for your SQL statement.
You can also download the PlanViz (PLV) file of the executed access plan containing the comprehensive plan information to display it with other HANA plan visualizing tools like HANA SQL Analyzer.
