S
© 2015 SAP SE. ALL RI GHT RESERVED.
A NEW ARCHITECTURE
FOR ENTERPRISE APPLICATION
SOFTWARE BASED ON
IN-MEMORY DATABASES
Dr. Jens Krueger
SVP, Head of LoB Finance &
SAP Innovation Center
45
thAnnual Convention of the
German Informatics Society
September 30, 2015 Cottbus
S
2
Large enterprise systems
Transaction-maintained aggregates explode in complexity
~ 30,000 Functions
~ 80,000 Tables
~900,000 Columns
Data Footprint
of up to 150TB
}
Aggregate Maintenance
Development Costs
Schema Complexity
Consistency
Redundancy
Storage Costs
Backup
Disaster Recovery
}
}
SHardware development
Enabler for a new era of business processing
NEAR FUTURE
20 YEARS AGO
TODAY
MEMORY 48 TB CORES 480 (8X4X15) MEMORY
1
GB CPU4
X50
MHZ MEMORY6
TB CPU120
X3.0
GHZ X 6000 X 1800 SWorkload analysis
Read-mostly applies to OLTP and OLAP
0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 % OLTP OLAP W orkload 0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 % TPC-C W orkload Read Insert Modification Delete Read Insert Modification Delete
TPC-C Benchmark Workload Analysis
Krueger et al. VLDB’11
S
Simplification and Fexibility
By removing static pre-defined materialized aggregates
Static Pre-Defined
Aggregates Flexible AggregationOn Demand
Dynamic on-the-fly reporting enables
analysis & simulation of organizational changes. Impact analysis is
immediately available
FI POSTINGS CUSTOMERS PRODUCTS PROFIT CENTERS SUPPLIERS
ON-THE-FLY AGGREGATIONON-THE-FLY AGGREGATION
FI POSTINGS CUSTOMERS PRODUCTS PROFIT CENTERS SUPPLIERS
Static pre-defined aggregates cannot
handle structural changes within the organization
Requires Anticipation Does NOT Require Anticipation
S
2009: A common database approach
For OLTP and OLAP using an in-memory column database
Read-only Replicas Main Memory Storage
Data Management Layer OLTP & OLAP Applications
...
Logs Checkpoints SQL Interface Stored Procedures Non-volatile Storage Stored Procedures Row Store Column Store Logistics Financials Manufacturing ... Dictionaries Attribute Vectors Aggregate Cache Attribute Vectors Dictionaries Aggregate Cache Attribute Vectors Dictionaries Aggregate Cache Attribute Vectors Dictionaries Main Main Main DeltaActual Partition (Master)
Historical
Partition 1 Partition 2Historical
Source: SIGMOD June 2009
S
A textbook example
Wire money from account A to account B
Accounts with
Transaction-Maintained Balance
TRANSACTIONS BALANCERaw Account
Transactions
TRANSACTIONS Update InsertΣ Read (Column Scan) Primary Key Select
S
Example
Posting of a vendor invoice
Vendor Invoice
Row 1: ~~~~~
Tax: ~~~~~
Total: ~~~~~
Header
Account
Vendor
Cost
G/L Account
Tax
G/L Account
119 Credit
100 Debit
19 Debit
SSAP Financials – Invoice Posting
Before simplification
BSET
Index on Primary Key Other Indices
Application managed materialized views
Closed Items Tax Documents BKPF Accounting Document Header BSEG Accounting Line Items Application managed materialized aggregates COBK Controlling Object Document Header COEP Controlling Object Line Items
Vendors Customers G/L Accounts
BSAK BSIK BSAS BSIS BSID BSAD Open Items Update FAGLFLEXA Split Accounting Line Items Insert Customer KNA1 KNC1 Vendor LFC1 LFA1 General Ledger GLT0 SKA1 Cost Center COSP CSKS S
SAP Financials – Invoice Posting
Simplification
Customer KNA1 KNC1 BSETVendor General Ledger
LFC1 LFA1 SKA1 Tax Documents Cost Center COSP CSKS BKPF Accounting Document Header BSEG Accounting Line Items ACDOCA Split Accounting Line Items COBK Controlling Object Document Header COEP Controlling Object Line Items
Vendors Customers G/L Accounts BSAK BSIK BSAS BSIS BSID BSAD GLT0 SKA1 S
SAP Financials – Invoice Posting
After simplification with database views
Customer KNA1
Vendor General Ledger
LFA1 SKA1 Cost Center CSKS BKPF Accounting Document Header BSEG Accounting Line Items KNC1 LFC1 GLT0 COSP
Views with
on-the-fly
Aggregations
BSAK BSIK BSAS BSIS BSID BSADCOBK COEP BSET
Views with
Projection and
Selection
ACDOCA Split Accounting Line Items SWhy column-stores are better than row stores for
transaction processing - theoretically...
Classic SAP Financials with Transaction-Maintained Aggregates
19 Inserts 5 Updates
Simplified SAP Financials
BSEG
BKPF BSEG BSIS BSIS BSIK BSET LFC1 GLT0 COBK COEP COSP
ACDOCA (PER LEDGER) FAGLFLEXA
(PER LEDGER) ...
BKPF
Insert duration with and w/o transaction-maintained aggregates
7 Inserts 0 Updates
S
...and experimentally with respect to workload and runtime
0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 % Classic Simplified W orkload Insert Modification DeleteSAP Financials Workload Analysis SAP Financials Runtime Analysis
Document posting measured on customer data
SAP Financials Read 0 5000 10,000 15,000 20,000 25,000 30,000 Time (ms)
Suite on HANA S/4HANA Finance
Sum of CPU time (ms) Sum of DB reg. time (ms)
S
Universal Journey Entries establish a single source of truth
and enable a variety of new analyses
Analytics
Processing Transaktional Analytisch
Financial Accounting Documents Material Ledger Documents Asset Accounting Documents Dokumente der Finanzbuchhaltung Dokumente der
Finanzbuchhaltung Universal Journal
Entries Controlling Documents Profitability Documents Analytics Processing
Totals + Indices Totals + Indices Totals + Indices Totals + Indices Totals + Indices
on-the-fly aggregation
S
Compatibility views enable a non-disruptive adoption
by redundant tables
CORE DATA MODEL
OF SAP S/4HANA FINANCE
Filter Project Transform Filter Project BKPF ACDOCA Filter Project Aggregate Item Views
BSID, BSAD, BSIK, …, FAGLBSIS, … Aggregate Views GLT0, LFC1, KNC1, FAGLFLEXT, … Journal Views COBK, COEP, FAGLFLEXA COMPATIBILITY VIEWS BSEG S
No aggregates: on-the-fly aggregation of inventories
Simplified Logistics
Classical Logistics Data Model
Simplified Logistics Data Model
MSTQH MSKUH MSTBH MKOLH MSKAH MSTHE MSSAH MSEG
TRANSACTIONAL DATA AGGREGATED QUANTITIES MASTER DATA + AGGREGATED QUANTITIES MASTER DATA
MATDOC MKPF MARDH MCHBA MSSQH MCHBH MARCH MSTQ MSPR MSSQ MSKU MSLB MSTE MKOL MCHB MARD MSSA MSKA MARC MCH1 MAKT MCHA MARM MARA MSSQ MSKU MARD MSSA MSKA MARC MCH1 MAKT MCHA MARM MARA S
Simplified Logistics
Example case with real data from large automotive company
Backflush real-time, large automotive company
0 0 10 20 30 40 50 60 70 80 90 100 200 300 400 500 600 700 800 900 Delete Throughput items/sec # Parallel Processes Classical Data Model Simplified Data Model
S
Database footprint reduction
With SAP HANA
BACKUP/RECOVERY 1
/35
OF ERP ON ANY DB DEVELOPMENT SYSTEM 1/35
OF FULL DATA TEST SYSTEM 1/35
OF FULL DATA No Indices No Aggregates No Redundancy 7.1 TB 1.8 TB 0.8 TB«sERP» on HANA (estimate) ERP on any DB ERP on HANA CACHE 0.3 TB CACHE 0.3TB HOT 0.2TB HOT 0.2TB 3 : 1
Hot = Actuals, status at beginning of current year + all transactions during
current year to conduct business and fulfill statuary reporting
Cold = Historical, up to 10 years
S
Transparent aggregate cache
Database-maintained aggregates on read-only main partition
MAIN COLD 1 COLD N DELTA MAIN COLD 1 COLD N DELTA AGGREGATES On-the-fly
Aggregation Aggregate CacheTransparent
Inserts
Aggregation Σ
Aggregation Σ
Inserts
S
Read-Only Replication
Leveraging business workload characteristics
Executives Sales Managers
Data Entry
Master Node
Read-only Replicas
Operational Reporting & New Applications
Accountants
OLAP, Search, and Read-only Applications on Transactional Schema Mixed Workload Processing OLTP Asynchronous, Transactionally Consistent Replication S
Boardroom Redefined
Review the state of the business at any time, examining data in real-time
Prioritize where we spend time reviewing Apply analytics to identify solutions
Higher speed leads to more intelligence
TRENDS
S
Thank you.
S
This presentation outlines our general product direction and should not be relied on in making a purchase decision. This presentation is not subject to your license agreement or any other agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This presentation and SAP's strategy and possible future devel-opments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP
as-sumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.
S
© 2015 SAP SE. ALL RI GHT RESERVED.