cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Column Store Data Type

Former Member
0 Kudos

Hi,

When I create a table from the UI, I see that there exits a column called Column Store Data Type.

What is the use of it?

Thanks & Regards,

Monissha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Hi Monissha,

     In SAP HANA, data is stored as either column based or row based in the tables.HANA is a column oriented database (also called as C-stores) stores the content column wise rather than by row. It is very useful in data compression, Storing data by column results in better compression than the conventional row store. It also performs well while query processing since queries read only the columns which are required.

You can also go through the link.

I hope this helps,

Cheers,

Sumit

Former Member
0 Kudos

Hi Sumit,

Thank you so much for the reply. Actually I my doubt was about a column called column store data type. Kindly refer to ma screenshot.

Thanks & Regards,

Monissha

vivekbhoj
Active Contributor

Hi Monissha,

Column Store data types are used internally in the column store.

Also check the reply from Lars regarding Column Store data types in the below thread:

http://scn.sap.com/thread/3522274

You can check the mapping between SQL Data types and Column store data types in the below link:

https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a1569875191014b507cf392724b7eb/content.htm#...

Regards,

Vivek

Former Member
0 Kudos

Hi Monissha,

     It is just the way data is stored internally columnar format. When you choose column store while creating the table, HANA internally assigns a data type for storing your specific data and data types which Column store data types. Anyway you dont have to worry about it while creating the table or inserting the data because you dnt use column store data types, which are generally referred as 'CS_', as it is all done internally so you just need to use SQL data types which you have used in provided screenshot. For more info you can refer link given by Vivek.

Cheers,

Sumit

Former Member
0 Kudos

Hi Vivek/Sumit,

Thank you very much for the useful link. I have gone through that as well.

I created a row table and you can see my definition below

So in case if my table is row, the column store data type has values like STRING,INT etc..

My questions are as follows.

  • Are these data types are just being filled up in the UI and not used internally in case of a row table??
  • data types STRING & CS_STRING are totally different as STRING data type is not a defined data type under column store data type?

Though these aspects are used up internally, I an just curious to know how this works.

Thanks & Regards,

Monissha

Former Member
0 Kudos

Hi Monissha,

     If you have checked the link given above. It gives the relation between the SQL data types and Column store data types. So if you see the different SQL data types which are referred as 'CS_STRING' in column store data types. Those SQL data types are stored as 'CS_STRING' column store data types internally be it row type table or column type table.

Cheers,

Sumit

vivekbhoj
Active Contributor
0 Kudos

Hi Monissha,

  • Are these data types are just being filled up in the UI and not used internally in case of a row table?? - It doesn't matter whether the table is row or column store table. Any table you create in HANA(through SQL or UI) will have column store data type for internal usage

  • data types STRING & CS_STRING are totally different as STRING data type is not a defined data type under column store data type? - SQL data types are mapped to column store data types. Refer to the link shared by me in previous reply.

Regards,

Vivek