Skip to Content

Questions about Delta Merge in Hana

Hi,

We have a table in HANA which was initially this big:

After a few days, we've checked it again and the 'size on disk' was reduced by 8GB:

I suspect it is because a delta merge happened in between these times:

My question is, does delta merge affect the 'size on disk' of a HANA table? Is it normal that tables lose data after a delta merge? For instance, the table above lost over 7000 entries after the merge. What causes a table to occupy 'disk size' that is significantly large than total memory consumption?

uno.png (40.5 kB)
dos.png (8.2 kB)
tres.png (127.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 17, 2019 at 05:35 PM

    Hello Redije,

    As you might be aware that column store is divided in to two fragment in HANA database: Main storage and Delta Storage.

    The main storage contains the main part of the data. Here, efficient data compression is applied to save memory and to speed up searches and calculations. On other hand, write operation on the compressed data in the main storage are costly, so write operations do no directly modify compressed data in the main storage. Instead, all changes are written to a separate data structure called delta storage. This delta storage uses only basic compression and is optimized for write access.

    So in short, the read operations are performed on both structures (main and delta), while write operations only affect the delta.

    Now the purpose of the delta merge operation is to move changes collected in the delta storage to the read-optimized main storage. After the delta merge operation, the content of the main storage is persisted to disk. Its compression is recalculated and optimized, if necessary.

    So now coming back to your query, whether delta merge affect the "size on disk" of a HANA Tables?

    Yes, depends on what changes (INSERT, UPDATE, DELETE) are written to delta storage. Any changes whether it is insert, update or delete on HANA Column store tables, it is not directly updated in main storage. Instead the change information is written to a delta storage. So if there are several delete operation happening on a given table (like housekeeping job running in background), that changes will be written on delta storage (at that time size on disk will be same as that was before delete operation). But when a delta merge happens, changes will be merged into main storage which will then be persisted to disk. So your table size on disk will shrink as several records are removed and table is compressed.

    So it is not a data loss, it is just that your system is making changes (update or delete) to that tables.

    Regards,

    Dennis Padia.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.