cancel
Showing results for 
Search instead for 
Did you mean: 

Disk storage in HANA

Former Member
0 Kudos
342

Hi All,

How does Delta Merge affect the disk space occupied by a table. I have observed that upon Delta Merge the disk space occupied by a table comes down but am not quite sure about the reasons for the same.

Besides, does HANA perform any compression/ encoding while storing data on the disk as well or are these only for the in-memory section.

Pl advise. Thanks.

View Entire Topic
vivekbhoj
Active Contributor
0 Kudos

Hi Saurabh,

When records are present in Delta, there is no compression but when Delta Merge is performed and records are moved to main storage, compression happens

Data is stored in compressed form in Disk also - same as in RAM

Regards,

Vivek

Former Member
0 Kudos

Thanks Vivek.

When the Delta Merge is performed, does it also lead to compression on the disk ? How can the reduction in disk space, upon Delta Merge, be explained.

Would you know what kind of compression techniques are used for compressing the data on the disk ? Thanks.

vivekbhoj
Active Contributor
0 Kudos

Hi Saurabh,

Data is compressed in RAM using compression techniques like Dictionary Encoding, Run Length Coding and then same compressed data is stored in disk too

I guess as once Delta Merge is completed, original delta store is deleted so that will cause memory reduction

Check the below document on Delta Merge:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10681c09-6276-2f10-78b8-986c68efb...

You can learn more about these techniques from OpenHPI course(it's free):

Course: In-Memory Data Management

Regards,

Vivek

Former Member
0 Kudos

Thanks Vivek.

I understand about the various encryption techniques you mentioned above.

My doubt about the change in disk space upon Delta Merge still remains, would appreciate if you can please help me on it. Thanks.

vivekbhoj
Active Contributor
0 Kudos

Hi Saurabh,

As far as I know,

During Delta Merge operation, new main store and new delta store is created

All the data from earlier main store and delta store is copied to new main store and is compressed

Lets say we had Main Store 1 and Delta Store 1 with size 100 MB and 50 MB => Total Size = 150 MB

During Merge, Main Store 2 and Delta Store 2 will be created

Uncommitted transactions from Delta 1 are copied to Delta 2

Data from Main Store 1 will be copied to Main Store 2 => 100 MB

and then data from Delta Store 1 will be copied to Main Store 2 and at the same time this data will undergo compression - lets say the data was compressed from 50 MB to 25 MB

So the new Main Store 2 has total size of => 125 MB

Thus after merge less memory is there

Regards,

Vivek

former_member182302
Active Contributor
0 Kudos

Hai Saurabh,

As Vivek is mentioning,

The data in "Delta" is uncompressed. Hence the Total Disk size ( Main + Delta) is more .

After merge happens and transfers the data from Delta to Main now all the data is in compressed format and hence reduces the size taken on the disk.

Regards,

Krishna Tangudu