cancel
Showing results for 
Search instead for 
Did you mean: 

Impact of DB table structure change with Column-Store (HANA)

mh97
Contributor
0 Kudos

Hi, we have a request to change a Z field length in KNA1. This is not the last field in the table structure. We are long in production and the table is large. In pre-HANA days, the technical team would strongly resist making a change like this. My question: does the switch to column-store improve the outlook for changing field lengths? (As, rows do not need to be rebuilt?)

I will probably still resist this approach to the requirement (we have other options), but thinking about the column-store aspect has me curious now. Any experts out there who can give an authoritative answer on this?

View Entire Topic
Cocquerel
Active Contributor

Hello,

When doing an ALTER statement to change the length of a column, it is possible to specify the option ON LINE (see https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/20d329a6751910149d5fdbc... )

This is only possible for column based table.

The statement will run longer time but it will minimize the time the table is locked.

Regards,

Michael

mh97
Contributor
0 Kudos

Hi Michael, thanks for your answer. I should have mentioned, this is an ECC system using HANA database, and the mentioned table is column-store. We would not be doing an ALTER statement, but importing the change via the transport system. In my past experience (pre-HANA), such a change is not advised and could cause issues for a large table already in use. It certainly requires the rebuild of the table on the database.

Your answer does support my idea that it might be less of an issue on HANA than a row-store DB; at least the rebuild should be faster.

Cocquerel
Active Contributor
0 Kudos

Hi Margaret,

On ECC, you can first run an ALTER statement directly at database level and then transport the DDIC change on ABAP side. As there will be no difference in the structure of the table between DDIC and database, the transport will have no effect.

Regards,

Michael