Saturday 22 July 2023

How to Analyze HANA database Performance ?

You can use monitoring views to analyze how effectively your system is handling the current workload.

This section lists some of the most valuable views available that you can use to analyze your workload and gives suggestions about actions that you might take to improve performance. Refer also to the scenarios section for more details of how these analysis results can help you decide which workload management options to apply.

Analyzing SQL Statements

Use these views to analyze the performance of SQL statements:
  • M_ACTIVE_STATEMENTS

  • M_PREPARED_STATEMENTS

  • M_EXPENSIVE_STATEMENTS

If these views indicate problems with statements you can use workload classes to tune the statements by limiting memory or parallelism.

Consider also the setting of any session variables (in M_SESSION_CONTEXT) which might have a negative impact on these statements. SAP Note 2215929 Using Client Info to set Session Variables and Workload Class settings describes how client applications set session variables for dispatching workload classes.

Analyzing CPU Activity

Use these views to analyze CPU activity:
  • M_SERVICE_THREADS

  • M_SERVICE_THREAD_SAMPLES

  • M_EXPENSIVE_STATEMENTS.CPU_TIME (column)

  • M_SERVICE_THREAD_CALLBACKS (stack frame information for service threads)

  • M_JOBEXECUTORS (job executor statistics)

These views provide detailed information on the threads that are active in the context of a particular service and information about locks held by threads.

If these views show many threads for a single statement, and the general system load is high you can adjust the settings for the set of 'execution' ini parameters as described in the topic Controlling Parallel Execution of SQL Statements.


Thanks 

Rupesh Chavan

https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/workload-in-context-of-sap-hana