In this article, we will take a quick look at the main benefits of columnar storage implemented in HANA database.
Relational databases usually use a string storage type. SAP HANA uses both row and column types of information storage. In this case, in the process of creating a table without explicitly specifying the type, a table with the COLUMN type will be created in the database. In SAP HANA, these two types of tables are very different from a database administrator's point of view, while for a developer these differences are not always obvious.
Column-oriented databases are more suitable than traditional row-oriented databases for analytical tasks such as large data warehouses, decision support, predictive analytics, etc.
Computer memory is organized in a linear sequence. Classic row-store tables are stored as a sequence of records containing fields of one row. In columnar storage, the columns are stored in contiguous memory locations. The figure below shows the difference in memory storage between string and columnar tables.
The main difference in storage types is read operations, which are more efficient with column storage than with string storage.
, :
, .
, . , . , , RAM CPU.
SAP HANA ( ) – Dictionary ( ). , Main, Delta store. , , . «» .
( ) M_CS_COLUMNS COMPRESSION_TYPE.
! . .
SAP HANA : . . :
(Dictionary) «Last Name» «Location» :
, , , . .
integer, . :
, , , . , . , , .
, , , . CPU. , CPU. , , , (). CPU. SAP HANA.
– , . (). , Join. . , , .
, , . .
In this article, we briefly reviewed the main advantages of columnar storage implemented in SAP HANA database. This is the default storage type. In a sense, this is SAP's attempt to unite the two worlds of OLAP and OLTP applications, since columnar tables not only increase performance in read operations, but also allow you to build "heavy" analytical views in transactional systems.