HANA News Blog

HANA Sequences - die verborgene Handbremse im System

Matthias Sander • 31. August 2023

Nutzung von Sequences

Verwenden sie in ihren SAP HANA Systemen Sequences? Das sollte unbedingt geprüft werden. Diese können bei nicht korrekter Einrichtung die Performance einzelner SQL-Statements stark beeinflussen. Eine HANA Sequence kann mit einem fortlaufenden Nummernkreis im ABAP verglichen werden. Die Sequence generiert eindeutige, vorlaufende Nummern, die z. B. von einem HANA Trigger oder beim INSERT in eine Tabelle verwendet werden können. Ähnlich wie im ABAP können Nummern gepuffert werden. Im Standard ist der Cache jedoch auf 1 eingestellt.

 

Greifen gleichzeitig viele Operationen auf die Sequence zu, kommt es zu Wartesituation, bis die nächste Nummer vergeben wird. Durch Erhöhung des Sequence Cache kann dieses Problem gelöst werden. Hinweis: Durch den Einsatz des Caches kann es Lücken in der Vergabe geben, jedoch sind die Nummern immer fortlaufend.


Wie prüfe ich, ob Entwickler oder gar Third-Party Hersteller HANA Sequences benutzen?

Sequence im Statement erkennen:

Im Statement ist die Sequence durch die Funktion “.NEXTVAL” zu erkennen.

Beispiel mit Trigger:

Der Trigger, welcher wiederum eine Sequence verwendet, macht circa 90 % der Laufzeit des Statements aus. Hier zu sehen im Kontext der Child Prozesse.

Kernel Profiler

Statement Collector des Trigger Statements

CallStack Not Initialized   : This is a generic, unspecific semaphore name used for various semaphores in IBM on Power environments. On Intel they follow the naming convention "<module>.cpp: <function>" instead, e.g. "DeltaIndexManager.cpp: TRexAPI::DeltaIndexManager::MergeAttributeThread::MergeAttributeThread".

Mittels Kernel Profiler kann ermittelt werden, was genau die DB in diesem Status macht. Das gilt auch für andere Fälle.

3,88s Wartezeit

Davon entfallen über 90% auf die HANA Sequence

Beim konkreten Kundenfall hatte das folgenden Effekt:

Peakzeiten vor Caching: 160ms pro Ausführung

Peakzeiten nach Caching: 1ms pro Ausführung


Im täglichen Durchschnitt sieht der Ergebnis folgendermaßen aus:

SAP HANA News by XLC

von Jens Gleichmann 14. April 2026
KVM as alternative with low TCO
inverted individual index is a special type of SAP HANA index wich can save memory
von Jens Gleichmann 6. April 2026
An inverted individual index is a special type of SAP HANA index which can only cover unique indexes. This includes all primary key structures. Unlike traditional column store indexes on more than one column (inverted value, inverted hash) an inverted individual index (Inv Idv Idx) doesn't need a dedicated concat.
Total NSE savings
von Jens Gleichmann 5. April 2026
This blog presents the results of a customer case which can be used as a reference for other implementations
SAP HANA performance issues with THP on multi-NUMA node systems
von Jens Gleichmann 30. März 2026
SAP HANA systems may experience high swap usage, hangs, or performance issues when THP (Transparent Huge Pages) is enabled with "madvise". This occurs on multi-NUMA node systems where one or more NUMA nodes are close to full memory usage while others have plenty of free memory, and counters for THP allocations, direct
Transparent Huge Pages (THP) with madvise can trigger high swap usage and performance issues
von Matthias Sander 26. Januar 2026
Transparent Huge Pages (THP) with madvise can trigger high swap usage, performance issues, or even system hangs on multi-NUMA systems.
HANA performance degradation after upgrade to SPS07+SPS08
von Jens Gleichmann 9. Januar 2026
With SPS06 and even stronger in SPS07 the HEX engine was pushed to be used more often. This results on the one hand side in easy scenario to perfect results with lower memory and CPU consumption ending up in faster response times. But in scenarios with FAE (for all entries) together with FDA (fast data access), it can result in bad performance. After some customers upgraded their first systems to SPS07 I recommended to wait for Rev. 73/74. But some started early with Rev. 71/72 and we had to troubleshoot many statement. If you have similar performance issues after the upgrade to SPS07 feel free to contact us! Our current recommendation is to use Rev. 74 with some workarounds. The performance degradation is extreme in systems like EWM and BW with high analytical workload.
SAP HANA NSE - a technical deepdive with Q&A
von Jens Gleichmann 24. November 2025
SAP NSE was introduced with HANA 2.0 SPS04 and based on a similar approach like data aging. Data aging based on a application level approach which has a side effect if you are using a lot of Z-coding. You have to use special BADI's to access the correct data. This means you have to adapt your coding if you are using it for Z-tables or using not SAP standard functions for accessing the data in your Z-coding. In this blog we will talk about the technical aspects in more detail.
Partitioning process
von Jens Gleichmann 24. November 2025
SAP HANA scaling and tuning with proper partitioning designs
R+R: intersection and missing services
von Jens Gleichmann 25. September 2025
In transformation projects like SAP RISE / SAP Cloud ERP, the Roles & Responsibilities (R+R) list often serves as the backbone for collaboration between customer, partner, and SAP. Yet too often, this list is treated as a static document rather than a living framework. Sometimes nobody knows exactly what was defined by
Why Databases Need Optimizer Statistics – With a Focus on SAP HANA
von Jens Gleichmann 28. Mai 2025
In the world of modern database management systems, query performance is not just a matter of hardware—it’s about smart execution plans. At the core of generating these plans lies a critical component: optimizer statistics. This article explores why databases need optimizer statistics, with particular emphasis on SAP HANA, while drawing parallels with Oracle, Microsoft SQL Server (MSSQL), and IBM DB2.
more