HANA News Blog

Range Partitioning - Dynamic Aging for NSE

Jens Gleichmann • 28. Dezember 2024

Dynamic Aging for NSE - combined with Threshold and Interval option

Dynamic Aging

Currently you have to page out your NSE partition from time to time manually. This is an important task to save frequently memory and not wasting your costly resources. But sometimes it was forgotten or there is a project freeze phase and you cannot touch your systems. Today, such tasks can be carried out completely automatically and autonomously using the feature Dynamic Aging.

Dynamic Aging makes it possible to automatically manage at which point in time older partitions can be moved to the 'warm' data store => NSE. As an extension of the Dynamic Range Partitioning feature Dynamic Aging makes it possible to automatically manage when older partitions can be moved to the 'warm' data store (Native Storage Extension) with the load-unit attribute for the partition set to PAGE LOADABLE. Warm data is then stored on disk and only loaded to memory when required.

Dynamic Aging can be used with both THRESHOLD mode (defining a maximum row count number in partition OTHERS) and INTERVAL mode (defining a maximum time or other numeric interval between each new partition). For example, for a partitioned table which is managed by dynamic partitioning and containing date/time information, you can specify an age limit (for example six months) so that when data in an old partition reaches this age it is moved to NSE storage. The interval is referred to as a 'distance threshold' value.


Prerequisites

Dynamic Aging supports INTEGER columns and DATE columns using the following data types (the NVARCHAR data type is not supported):

  • INTEGER data types: INT / SMALLINT / TINYINT / BIGINT
  • DATE data types: DATE / LONGDATE / SECONDDATE / TIMESTAMP


Syntax

... PARTITION OTHERS DYNAMIC [THRESHOLD <int> [DISTANCE <int> PAGE LOADABLE]]

... PARTITION OTHERS DYNAMIC INTERVAL <int + type> [DISTANCE <int + type> PAGE LOADABLE];


Interval option

CREATE COLUMN TABLE EXAMPLE (A SECONDDATE NOT NULL) PARTITION BY RANGE(YEAR(A)) (

PARTITION 0000 <= VALUES < 2021,

PARTITION 2021 <= VALUES < 2022,

PARTITION 2022 <= VALUES < 2023,

PARTITION 2023 <= VALUES < 2024,

PARTITION 2024 <= VALUES < 2025,

PARTITION 2025 <= VALUES < 2026,

PARTITION OTHERS DYNAMIC INTERVAL 1 YEAR DISTANCE 2 YEAR PAGE LOADABLE);

=> In this example, table EXAMPLE has a column for time values; it has an interval value of 1 year and a distance value of two years. This means new partitions generated by Dynamic Range will have range interval set as 1 year, and the partitions containing data older than 2 years (comparing with the latest data) will be moved to warm storage.


ALTER TABLE EXAMPLE ALTER PARTITION OTHERS DYNAMIC DISTANCE 3 YEAR PAGE LOADABLE;


Threshold option

[...] PARTITION OTHERS DYNAMIC THRESHOLD 3000000 DISTANCE 50000 PAGE LOADABLE


Deactivation

ALTER TABLE EXAMPLE ALTER PARTITION OTHERS NO DYNAMIC DISTANCE;


Manual Refresh

ALTER TABLE T1 REFRESH DYNAMIC DISTANCE


=> The background job to apply Dynamic Aging is timed to run automatically every 20 minutes but an update can be triggered manually for a single table with a REFRESH instruction


Pitfalls interval option

If a partition has been explicitly set to COLUMN LOADABLE, or if the column loadable attribute is inherited from its parent, then the partition's load unit will not  be changed by Dynamic Aging. By default, the load unit setting of a partition is DEFAULT LOADABLE, which means there is no explicit preference. In practice, this means that you must not explicitly apply the COLUMN LOADABLE load unit property to an OTHERS partition where dynamic aging is active as this would prevent any automatic conversion of data.


How you can check if interval option is active?

SELECT TABLE_NAME, DYNAMIC_DISTANCE_INTERVAL, DYNAMIC_DISTANCE_LOAD_UNIT from TABLE_PARTITIONS


Summary

The Dynamic Aging feature is genius if you are using NSE, but cannot be used for SAP applications like S/4 or BW/4, because there are no table with datetime data type. NVARCHAR is not supported by now. You can only use it in HANA cloud or in HANA 2.0 native scenarios. Sadly but it is a first step.

SAP HANA News by XLC

More time to switch from BSoH to S/4HANA
von Jens Gleichmann 7. Februar 2025
Recently handelsblatt released an article with a new SAP RISE option called SAP ERP, private edition, transition option. This option includes a extended maintenance until the end 2033. This means 3 years more compared to the original on-prem extended maintenance. This statement was confirmed by SAP on request of handelsblatt, but customers receive more details, such as the price, in the first half of the year. This is a quite unusual move of SAP without any official statement on the news page. Just to raise more doubts? Strategy? However a good move against the critics and the ever shorter timeline. Perhaps it is also a consequence of the growing shortage of experts for operating and migrating the large number of systems.
Performance degradation after upgrade to SPS07
von Jens Gleichmann 3. Februar 2025
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.
Optimize your SAP HANA with NSE
von Matthias Sander 15. Januar 2025
When it comes to optimizing SAP HANA, the balance between performance and cost efficiency is critical. I am happy to share a success story where we used the Native Storage Extension (NSE) to significantly optimize memory usage while being able to adjust the sizing at the end. The Challenge: Our client was operating on a 4 TB memory SAP HANA system, where increasing data loads were driving up costs and memory usage. They needed a solution to right-size their system without compromising performance or scalability. The client wanted to use less hardware in the future. The Solution: We implemented NSE to offload less frequently accessed data from memory. The activation was customized based on table usage patterns: 6 tables fully transitioned to NSE 1 table partially transitioned (single partition) 1 table transitioned by specific columns
SAP HANA NSE - a technical deepdive with Q&A
von Jens Gleichmann 6. Januar 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.
The SAP Enterprise Cloud Services Private Cloud Customer Center (PC3) - a new digital delivery
von Jens Gleichmann 5. Januar 2025
The SAP Enterprise Cloud Services Private Cloud Customer Center (PC3) - a new digital delivery engagement model dedicated to manage service delivery for RISE with SAP S/4HANA Cloud, private edition customers.
Proactive maintenance for SAP RISE will start now in 2025
von Jens Gleichmann 5. Januar 2025
Proactive maintenance for SAP RISE will start now in 2025 with minor tasks like updating SPAM/SAINT and ST-PI / ST-A/PI. For those companies which are familiar with frequent maintenance windows, they are good to have such time frames to hold the systems up-to-date and secure. However, for larger companies where such frequent maintenance windows are not common because every minute of downtime is costly and may only really be necessary once, the situation is quite different.
automatic maintenance of the 'others' partition
von Jens Gleichmann 28. Dezember 2024
You can create partitions with a dynamic others partition by including the DYNAMIC keyword in the command when you create the partition, this can be used with either a THRESHOLD value to define a maximum row count number or an INTERVAL value which can be used to define a maximum time or other numeric 'distance' value. The partition can be either a single level or a second level RANGE partition and dynamic ranges can be used with both balanced and heterogeneous partitioning scenarios.
HANA Range Partitioning details
von Jens Gleichmann 23. Dezember 2024
For heterogeneous partitioning schemas Dynamic Range Partitioning is available to support the automatic maintenance of the 'others' partition. When you create an OTHERS partition there is a risk that over time it could overflow and require further maintenance. Using the dynamic range feature the others partition is monitored by a background job and will be automatically split into an additional range partition when it reaches a predefined size threshold. The background job also checks for empty partitions and if a range partition is found to be empty it is automatically merged to neighboring empty partitions (the others partition is never automatically deleted).
A success story regarding BW/4HANA and different data tiering and optimization methodes.
von Jens Gleichmann 20. Dezember 2024
A success story regarding BW/4HANA and different data tiering and optimization methodes. 1) Removed overhead in key attributes which reduced the PK size (often more than 50% of the overall table size) 2) optimized the partitioning design 3) used NSE for write optimized ADSOs 4) introduced NSE for several ADSOs 5) optimized usage of inverted individual indexes
ACDOCA table growth - how to handle it
von Jens Gleichmann 10. Dezember 2024
ACDOCA table growth - how to handle it in a S/4HANA system
more
Share by: