The speed at which a business accesses its data varies based on many different conditions. SAP HANA Cloud provides the capability to use additional storage tiers other than memory to store data based on access speed and data density needs. SAP HANA Native Store Extension (NSE) is the disk storage option for use with data less frequently accessed than in memory. Memory is still utilized but only for the data that is being used. The SAP HANA data lake also offers high density storage at capacities far greater than possible using the other storage tiers.

Let’s look at SAP HANA Cloud NSE in more detail, with some practical examples to enhance the understanding.

SAP HANA Native Storage Extension (NSE) is a general-purpose, built-in warm data store in SAP HANA Cloud which allows management of less-frequently accessed data without fully loading it into memory.
It integrates disk-based or flash-drive based database technology with the SAP HANA in-memory database for an improved price-performance ratio.
Warm data is primarily used to store read-only data that doesn’t require frequent access. The data need not reside continuously in SAP HANA memory, but is still managed as a unified part of the database ― transactionally consistent with hot data, and participating in backup and system replication operations, and is stored in lower cost stores within SAP HANA Cloud.
This image shows the difference between standard HANA in-memory storage and the storage offered with NSE:

The SAP HANA Native Storage Extension (NSE) feature for warm data storage is enabled by default in SAP HANA Cloud. Database developers may choose to assign specific tables, columns, or partitions to use NSE. SAP HANA NSE uses a dedicated in-memory buffer cache to load and unload pages of tables, table partitions or table columns.
The initial buffer cache size can be adjusted once the SAP HANA instance has been created.
The following exercise demonstrates how to enable Native Storage Extension for a table and leverage its advantages in managing warm data.
This example uses the GX_EMPLOYEES columnar table containing 100,000 records, with its default persistency “in-memory” (hot).



To free up memory, this table will be partitioned and some data will move to the NSE warm storage tier.
1234/* Range Partitioning */
ALTER TABLE GX_EMPLOYEES
PARTITION BY RANGE(EMPLOYEE_GENDER)
((PARTITION VALUES = 'm', PARTITION OTHERS));

123/* Move partition 1 to NSE */
ALTER TABLE GX_EMPLOYEES
ALTER PARTITION 1 PAGE LOADABLE;
Return to the metadata screen for the GX_EMPLOYEES table and select the refresh button to update the figures.
The Loaded status of partition 1 has changed to partially loaded and total memory consumption by the table has been reduced:

The reason for the memory reduction is because the records from partition 1 are now stored as warm data on disk.
12/* Count the records */
SELECT COUNT(*) FROM GX_EMPLOYEES;
Observe that while half of the table is in memory (hot), with the other half on disk (warm), the table is still treated as a whole when queried.
12/* Merge partitions */
ALTER TABLE GX_EMPLOYEES MERGE PARTITIONS;
Now move the entire table to warm storage (PAGE LOADABLE) and notice the reduction in memory consumption.
12/* Move entire table to NSE */
ALTER TABLE GX_EMPLOYEES PAGE LOADABLE CASCADE;


12/* Move entire table into memory */
LOAD GX_EMPLOYEES ALL;
Well done!! This completes the lesson on the different options in SAP HANA Cloud for storing data in the right place based on user and storage requirements.