Troubleshoot Expensive SQL Statements on SAP HANA with SAP EarlyWatch Alert Workspace
SQL Statements on SAP HANA can be expensive in three different dimensions: either they have a long runtime or they consume a lot of CPU or a lot of memory. It can also be a combination of two of the above or all three in worst case.
The SAP EarlyWatch Alert does an automatic analysis of the top 5 SQL Statements in all three categories listing not only the SQL statements and statistics, but also information on the SAP HANA tables involved and the origin of the statement and if it is SAP or customer coding.
This analysis result comes handy in a detailed chapter in the report and it is now also included as a link the SAP EarlyWatch Alert dashboard for an individual system, that can be reached after clicking on the bubble-chart in SAP EarlyWatch Alert Workspace.
Alerts for expensive SQL statements can be found in the Solution Finder for SAP EarlyWatch Alert, where you can filter for a new category:
Performance -> SQL Statements
An alert is triggered, if the root cause of an expensive statement is known and a solution to reduce the load or avoid the statement can be recommended.
Click on the system id to navigate from the alert “Problematic SQL Statements” to the EWA report chapter:
SAP Note 2000002 is very helpful to find solutions to expensive statements: You can simply take the statement hash from the SAP EarlyWatch Alert report and search for it in this SAP note.
The automatic SQL Statement Analysis in SAP EarlyWatch Alert makes performance troubleshooting much easier, so take your time to check the SAP EarlyWatch Alert Workspace and click on the alerts card. Remove the filter for Alert Rating and Age. And filtering for alert category “Performance -> SQL Statements” you can find low-hanging fruits to tune your SAP HANA system.
If you want to check these kind of alerts on a regular basis, I recommend to create a calendar entry with the following link:
This link directly opens the Solution Finder filtered for the specific category of alerts.