top of page
  • Twitter Social Icon
  • LinkedIn Social Icon
  • Facebook Social Icon
Search

How SAP HANA Handles Data Changes (Insert, Update, Delete)?

  • Manoj Agrawal
  • Jun 12
  • 3 min read

SAP HANA stands apart from other databases. It does not overwrite or erase data outright. Instead, it operates through a memory-first approach. This is rapid but also distinctive. In business centers like Delhi, where real-time analysis must be delivered promptly in financial and ecommerce industries, engineers now work alongside SAP HANA to manage high volumes of fast-changing data. As a result, SAP HANA Training Institute in Delhi often focuses on how the system internally handles changes to the data.


If you’re learning HANA or planning to take HANA Training, understanding how it processes INSERT, UPDATE, and DELETE operations at the system level is critical. It helps in writing better queries, tuning performance, and managing memory.



SAP HANA uses a concept called insert-only storage. Although you might delete or update a record, HANA does not delete or modify it directly. Instead, it inserts new records and marks the old records as outdated.

High concurrency is supported by this concept. Locking is minimized, and parallel operations are supported.


How INSERT Works in SAP HANA?


In SAP HANA, data you insert is stored in a temporary place called the delta store. The delta store is write-efficient and allows quick access. SAP HANA does not write new data to the main store because it is read-optimized, not write-optimized.

Each insert is versioned and time-stamped. It is aware of who inserted it and when it was inserted. This keeps sessions consistent.

The new information stays in the delta store until there is a procedure called the delta merge. It then moves the information to the main store for better read performance. SAP HANA Certification is a must if you are looking for an upgrade in your career.


What Happens When You UPDATE Data?


An update is literally two operations in HANA. One, it marks the old row as deleted. Two, it inserts the updated row into the delta store. The original row is still there, but it's not visible to most queries.

This is done to support multi-version concurrency control (MVCC). That is, regardless of the fact that another user is reading, they won't be affected by your update. They will read what existed at the start of the read.


How DELETE Works Internally?


You do not delete a row in SAP HANA; you only delete it. When you delete, it does not disappear. HANA only marks it as deleted. It still exists in the delta store but is marked as invalid.

This is known as a logical deletion. The data is not lost to memory. It is merely deleted in the delta merge or cleanup process. It avoids the clogging of the system with redundant writes and releasing space in an orderly manner.

So when there are many deletes, the space will not be freed right away. You will have to monitor delta merge operations in order to see when HANA frees the space.


What is Delta Merge and Why Is It Important?


Delta merge is the internal cleaning mechanism of HANA. It also removes old rows and compresses the data.

It is the sole place where old data is actually deleted. That comprises:

Deleted rows

Old versions of updates

Temporary inserts

Delta merge happens automatically in the background. But admins can trigger it manually for large tables. In production environments like Delhi, where systems usually process millions of updates daily, admins at SAP HANA Training Institute in Delhi monitor this through system views like M_DELTA_MERGE_STATISTICS.


Technical Table: How SAP HANA Handles Data Changes

Operation

Action in SAP HANA

Stored In

Removed During

Notes

INSERT

New row added

Delta Store

During Delta Merge

High speed, time-stamped

UPDATE

Old row marked + new row added

Delta Store

During Delta Merge

Acts like delete + insert

DELETE

Row flagged as deleted

Delta Store

During Delta Merge

Not immediately removed from memory

Sum up,


SAP HANA never deletes or updates directly. Deletes are not actually executed; cleanup is done afterwards. Delta merge is the crucial process that optimizes memory. MVCC makes the system consistent and efficient. Systems in a place like Delhi use these benefits for real-time business logic.

 
 
 

Recent Posts

See All
Understanding the SAP MM Module

SAP ERP MM (Material Management) refers to an important part of the SAP ERP system and it is related to the organisation of procurement...

 
 
 

Comments


SIGN UP AND STAY UPDATED!

Thanks for submitting!

  • Grey Twitter Icon
  • Grey LinkedIn Icon
  • Grey Facebook Icon

© 2023 by Talking Business.  Proudly created with Wix.com

bottom of page