Professional Documents
Culture Documents
Mihnea Andrei
SAP Products & Innovation HANA Platform July 8, 2014 Public
Agenda
SAP
SAP HANA DB Background
Architecture
Column Store & Compression
Snapshot Isolation
Outlook
More than 66,500 employees – and locations in more than 130 countries
See “The SAP Transaction Model: Know Your Applications”, SIGMOD 2008 Industrial
Talk
Database was mainly a dumb store …
– Retrieve/Store data (Open SQL, no stored procedures)
– Transaction commit, with locks held very briefly
– Operational utilities
… because SAP kept the following in the application server:
– Application logic
– Business object-level locks
– Queued updates
– Data buffers
– Indexes
Year Price/GB
2013 $5.50
2010 $12.37
2005 $189
2000 $1,107
1995 $30,875
1990 $103,880
1985 $859,375
1980 $6,328,125
Source: http://www.statisticbrain.com/average-historic-price-of-ram/
© 2014 SAP AG or an SAP affiliate company. All rights reserved. Public 11
In-Memory Computing
100% 100%
Write: Write:
90 % Delete 90 % Delete
80 % Modification 80 % Modification
70 % Insert 70 % Insert
Workload
Workload
60 % 60 %
Read: Read:
50 % Range Select 50 % Select
40 % Table Scan 40 %
30 % Lookup 30 %
20 % 20 %
10 % 10 %
0 % 0 %
OLTP OLAP TPC-C
Insight to Action
Contextual. Real-time. Closed-loop.
Applications Analytics
BWA / BIA
Trex
Enterprise
Search
NewDB BW on Suite on HANA
/ HANA HANA HANA Platform
MaxDB
PTime
Sybase IQ/ASE/SA/RS/etc.
NewDB NewDB
Database Server Database Server
Execution Execution
Layer Layer
R R
NewDB
Database Server
In-Memory Stores In-Memory Stores
Execution
R R
Layer
R
Persistence Layer Persistence Layer
In-Memory Stores
R
Persistence Layer
Att1 Att2 Att3 Att4 Att5 Att1 Att2 Att3 Att4 Att5
Tuple 1 Tuple 1
Tuple 2 Tuple 2
Tuple 3 Tuple 3
Tuple n Tuple n
Application often processes single records at once Search and calculation on values of a few columns
many selects and /or updates of single records Big number of columns
Application typically accesses the complete record Big number of rows and columnar operations
Columns contain mainly distinct values aggregate, scan, etc.
Aggregations and fast searching not required High compression rates possible
Small number of rows (e.g. configuration tables) Most columns contain only few distinct values
© 2014 SAP AG or an SAP affiliate company. All rights reserved. Public 23
SAP HANA Technology
Dictionary Compression & N-bit Compression
0 INTEL
0 A Dictionary for attribute/
Company Region Group 1 Siemens
[CHAR50] [CHAR30] [CHAR5] 2 SAP 1 B column „Group“
0 Europe
3 IBM 1 USA 2 C
INTEL USA A
0 1 0
Siemens Europe B 1 0 1 Index Vector
Stored in one memory chunk
Siemens Europe C 1 0 2 => data locality for fast scans
SAP Europe A 2 0 0
SAP Europe A 2 0 0
IBM USA A 3 1 0
0 INTEL 0 INTEL
1 Siemens 0 A 1 Siemens 0 A
Company Region Group
2 SAP 0 Europe 1 B 2 SAP 0 Europe 1 B
[CHAR50] [CHAR30] [CHAR5]
3 IBM 1 USA 2 C 3 IBM 1 USA 2 C
INTEL USA A 0 1 x „0“ 1 x „0“
0 1 1 x „1“
Siemens Europe B 1 0 1 2 x „1“ 4 x „0“ 1 x „1“
SAP Europe A 2 0 0
IBM USA A 3 1 0
time
base list of rows visible to all
111011……………111101
inserted
deleted 11111
100010……………01000000010
tx3 commit
011001……………101101111011
Initial Design – set oriented, optimized for OLAP
tx2 access
Public
011000……………001101111100111
30
tx4 begin
& access
New Design – OLTP friendly
valid valid
from to
tx3: delete where … tx2 tx3
tx2: insert n rows …
New
rows
tx1: insert 1 row New row tx1
Data models
Flexible schemas, graph functionality, geospatial, time series, historical data,
Big Data, external libraries
Application services
XS Engine, CDS and River
On-Board DIMMs
Very high density, byte-addressable
DRAM like (< 3X) latency and bandwidth; similar endurance
Compete with disk on cost/bit by 2020
http://www.careersatsap.com/
http://jobs.sap.com
https://www.saphana.com
http://www.sap.com/pc/tech/in-memory-computing-hana.html
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG or an
SAP affiliate company.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG
(or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
These materials are provided by SAP AG or an SAP affiliate company for informational purposes only, without representation or warranty of any kind,
and SAP AG or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP AG or
SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.
In particular, SAP AG or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related
presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP AG’s or its affiliated
companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be
changed by SAP AG or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment,
promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties
that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking
statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.