SAP HANA Landscape
“HANA” mean High Performance Analytic Appliance is a combination
of hardware and software platform.
Due to change in computer architecture, the more powerful
computer is available in terms of CPU, RAM, and Hard Disk.
SAP HANA is the solution for performance bottleneck, in which all
data is stored in Main Memory and no need to frequently transfer
data from disk I/O to main memory.
Below are SAP HANA Innovation in the field of Hardware/Software.
There are two types of Relational data stores in SAP HANA: Row Store
and Column Store.
Row Store
It is same as Traditional database e.g. (Oracle, SQL Server). The
only difference is that all data is stored in row storage area in
memory of SAP HANA, unlike a traditional database, where data is
stored in Hard Drive.
Column Store
Column store is the part of the SAP HANA database and manages
data in columnar way in SAP HANA memory. Column tables are
stored in Column store area. The Column store provides good
performance for write operations and at the same time optimizes
the read operation.
Read and write operation performance optimized with below two data
structure.
Main Storage
Main Storage contains the main part of data. In Main Storage, suitable
data compression Method (Dictionary Encoding, Cluster Encoding,
Sparse Encoding, Run Length encoding, etc.) is applied to compress
data with the purpose to save memory and speed up searches.
In main storage write operations on compressed data will be
costly, so write operation do not directly modify compressed data
in main storage. Instead, all changes are written in a separate area
in column storage known as “Delta Storage.”
Delta storage is optimized for a write operation and uses normal
compression. The write operations are not allowed on main
storage but allowed on delta storage. Read operations are allowed
on both storages.
We can manually load data in Main memory by option “Load into
Memory” and Unload data from Main memory by “Unload from
Memory” option as shown below.
Delta Storage
Delta storage is used for a write operation and uses basic compression.
All uncommitted modification in Column table data stored in delta
storage.
When we want to move these changes into Main Storage, then use
“delta merge operation” from SAP HANA studio as below –
The purpose of delta merge operation is to move changes, which
is collected in delta storage to main storage.
After performing Delta Merge operation on sap column table, the
content of main storage is saved to disk and compression
recalculated.
Process of moving Data from Delta to Main Storage during delta
merge
There is a buffer store (L1-Delta) which is row storage. So in SAP HANA,
column table acts like row store due to L1-delta.
1. The user runs update / insert query on the table (Physical
Operator is SQL statements.).
2. Data first go to L1. When L1 moves data further (L1- Uncommitted
data)
3. Then data goes to L2-delta buffer, which is column oriented. (L2-
Committed data)
4. When L2-delta process is complete, data goes to Main storage.
So, Column storage is both Write-optimized and Read-optimized due to
L1-Delta and main storage respectively. L1-Delta contains all
uncommitted data. Committed data moves to Main Store through L2-
Delta. From main store data goes to the persistence layer (The arrow
indicating here is a physical operator that send SQL Statement in
Column Store). After Processing SQL Statement in Column store, data
goes to the persistence layer.
E.g. below is row-based table-
Table data is stored on disk in linear format, so below is format how
data is stored on disk for row and column table –
In SAP HANA memory, this table is stored in Row Store on disk as format
–
Memory address
And in Column, data is stored on disk as –
Memory address
Data is stored column-wise in the linear format on the disk. Data can be
compressed by compress technique.
So, Column store has an advantage of memory saving.
SAP HANA Sizing
Sizing is a term which is used to determine hardware requirement for
SAP HANA system, such as RAM, Hard Disk and CPU, etc.
The main important sizing component is the Memory, and the second
important sizing component is CPU. The third main component is a
disk, but sizing is completely dependent on Memory and CPU.
In SAP HANA implementation, one of the critical tasks is to determine
the right size of a server according to business requirement.
SAP HANA DB differ in sizing with normal DBMS in terms of –
Main Memory Requirement for SAP HANA ( Memory sizing is
determined by Metadata and Transaction data in SAP HANA)
CPU Requirement for SAP HANA (Forecast CPU is Estimated not
accurate).
Disk Space Requirement for SAP HANA ( Is calculated for data
persistence and for logging data)
The Application server CPU and application server memory remain
unchanged.
For sizing calculation SAP has provided various guidelines and method
to calculate correct size.
We can use below method-
1. Sizing using ABAP report.
2. Sizing using DB Script.
3. Sizing using Quicksizer Tool.
By using Quicksizer tool, Requirement will be displayed in below
format-