cancel
Showing results for 
Search instead for 
Did you mean: 

Row insert vs Column insert

rajarshi_muhuri
Active Participant
0 Kudos

we can create row based or column based tables in SAP HANA by

for row based table

create row table x ( i int a varchar(5) )

for column table

create column table y (j int b varchar(5))

how ever is my understanding correct , that all data loads including insert statements loads data row wise ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Rajesh,

Even coulmn or row tables, the DDL, DML SQL statements are same. but storing data in momemory is different way.

Column tables stores data high compression mode.

thanks

Rao

rajarshi_muhuri
Active Participant
0 Kudos

so the table

1 Rishi

2 Binky

for row based table be serialised as

1, rishi

2, binky

whereas for column based table be serialised as

1,2

Rishi, Binky

but the data is always loaded as

1, 'Rishi'

2, 'Binky'

Former Member
0 Kudos

Dear Manish,

Yes, you are right.

even Column base table also you use DML stament INSERT, DELETE, UPDATE are same.

so that you need to pass data

1, 'Manish'

2, 'Tomas'

but internally it converts column mode as you mentioned.

thanks

Rao

Vitaliy-R
Developer Advocate
Developer Advocate
0 Kudos

...

> Even column or row tables, the DDL, DML SQL statements are same. but storing data in momemory is different way.

>

> Column tables stores data high compression mode.

...

Just to be precise as well: column tables have two parts at the system level: Delta (which is write-optimized) and Main (which is read optimized and compressed). All changes are going into Delta part first, and the move of data from Delta into Main parts of column table is happening asynchronously.

Have a good weekend,

-Vitaliy

Answers (0)