cancel
Showing results for 
Search instead for 
Did you mean: 

Disk storage in HANA

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

A valuable discussion above ! After reading this I have following questions.

  • Will the compression technique in the main memory and disk be not same? Because the memory consumption always exist different for the two.
  • When I do 'perform delta merge' on my table I could see that stil delta memory holds few KB of data. It is mentioned above that 'uncommitted transactions' will be moved to new delta. What exactly is called as uncommitted transactions? In my table I have only one record but still delta memory is occupied.
  • Also after each of the delta merge the disk size varies, does it mean that after each delta merge the data in the disk is updated accordingly?

Kindly clarify these..

Thanks & Regards,

Monissha