HANA Optimal Performance

The optimal performance of SAP HANA is crucial for efficient data processing and analysis. It’s about monitoring resources like memory, analyzing workloads and evaluating costly SQL statements. This article provides a comprehensive guide to optimizing HANA performance through schema design, SQL query optimization, SQL script performance and calculation views.

Optimal SAP HANA performance requires careful planning and optimization at various levels, from schema design to SQL queries and calculation views. By implementing the best practices described, SAP HANA specialists can maximize the efficiency and speed of their data processing.

SAP-HANA-Certified-Technology-Consultant SAP HANA 2.0 SPS03

We are happy to support you in the following areas:

Schema Design

Table TypeChoosing the right table type is crucial. SAP HANA supports both row-based and column-based storage, with column-based storage being preferred for most scenarios due to its excellent compression and fast query performance. Row-based tables are better suited for small data sets or high-frequency transactional updates.
IndexIndexes play an important role in speeding up queries. Primary key indexes and secondary indexes, including multi-column indexes, help to reduce access times and increase query efficiency. However, it is important to find the balance between the number of indexes and the associated storage and maintenance overhead.
PartitioningThe partitioning of tables enables the horizontal distribution of data, which is particularly useful in distributed HANA landscapes. Proper partitioning can speed up queries by searching only relevant data partitions. However, it is important that the partitioning criteria correspond to the most frequent and expensive queries.
CacheThe use of cache mechanisms can significantly improve query performance. SAP HANA offers various cache options to accelerate data access and shorten response times.
DenormalizationDenormalization can improve performance by reducing the number of joins required. By merging data into a single table, query times can be reduced, although this can lead to increased redundancy and potential data inconsistencies.

SQL Query Performance

SQL Processing ComponentsSQL processing in HANA comprises various components, including the parser, optimizer and execution engine. Each of these components plays a key role in the efficient processing of SQL queries.
HANA SQL OptimizerThe HANA SQL Optimizer consists of a rule-based and a cost-based optimizer. The rule-based optimizer applies predefined rules, while the cost-based optimizer compares the execution costs of different query plans to select the most efficient plan.
ToolsVarious tools are available for the analysis and optimization of SQL queries. The SQL Plan Cache saves past query plans, while the Explain Plan Tool visualizes the execution strategy of a query. The Plan Visualizer and SQL Traces provide detailed insights into query execution. Debug traces such as the Step & Time Debug Trace help with detailed troubleshooting.
SQL Tuning GuidelinesTo improve SQL query performance, implicit type conversions should be avoided, inefficient predicates in joins and EXISTS/IN queries should be optimized and set operations should be reduced. Multi-column joins can be optimized by using hints to adjust the query plan.

SQL Script Performance

SQLScript OptimizerThe SQL Script Optimizer analyses and optimizes SQLScript procedures in order to minimize execution times.
SQLScript Performance AnalysisThe performance analysis of SQLScript includes checking SQL traces and plan profiles as well as the use of monitoring views such as M_ACTIVE_PROCEDURES.
SQLScript Performance GuidelinesTo improve SQLScript performance, the complexity of SQL statements should be reduced, dependencies between statements minimized and expensive queries avoided. The use of NO_INLINE hints can influence the inlining strategy and the use of cursors should be avoided.

Calculation Views

Setting Join CardinalityDefining the join cardinality helps the optimizer to choose the best execution strategy.
Optimizing Join ColumnsOptimizing join columns can improve query performance by avoiding unnecessary data accesses.
Using Dynamic JoinsDynamic joins enable flexible query optimization based on the data available at runtime.
Union Node PruningTrimming union nodes reduces the amount of data that needs to be processed and thus improves query performance.
Push Down Filters in Rank NodesPushing down filters in rank nodes enables more efficient data processing by moving filter operations as close as possible to the data source.
Scroll to Top