eG Monitoring
 

Measures reported by HanaExpensStmtTest

Expensive statements are individual SQL queries whose execution time exceeded a configured threshold. By default, this threshold is 1 second (1000000 microseconds). Such statements, besides being a resource-drain, may also block the execution of other SQL statements, degrading the performance of the database server in the process. To avoid such eventualities, these long-running statements need to be isolated and optimized rapidly. This is where the HANA Expensive Statements test helps.

This test reports the count of expensive SQL statements and the maximum duration for which such statements ran. Using the detailed diagnosis of the test, you can also identify the expensive SQL statements and attempt to fine-tune them in order to improve their performance, and consequently, enhance server performance.

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
statementCount Indicates the total number of expensive SQL statements executed on the SAP HANA database server. Number A low value is desired for this measure. A gradual/sudden increase in the number of expensive SQL statements can hamper the performance of the SAP HANA database server. Some of the consequeunces of executing the expensive SQL statements are as follows:

  • While an expensive SQL statement is being executed, as it has to fetch more blocks, already existing blocks in the database buffer are displaced to accommodate the blocks of this statement. This impacts performance of the other SQL statements and could impact performance of subsequent requests
  • " As the database will be busy readying many blocks to satisfy expensive SQL statements, other critical database tasks are very likely to slow down, which eventually may impact the performance of the SAP HANA database server
  • " While an expensive SQL statement is being executed, a work process is blocked till the completion of the request. So, it is not available for other requests which increases the wait time of other processes.

    You can use the detailed diagnosis of this test to identify the expensive statements and optimize them for better performance.

maxDurationInMillis Indicates the maximum time duration taken to execute an expensive SQL statement on the SAP HANA Database server. MilliSec A high value for this measure is a cause of concern. In order to fine tune the time duration, you may have to optimize the query by changing the query structure or adding index to the database table.