Presentation is loading. Please wait.

Presentation is loading. Please wait.

HANA database lectures March 2014. ©2013 SAP AG or an SAP affiliate company. All rights reserved.2 Outline Part 1 Motivation - Why main memory processing.

Similar presentations


Presentation on theme: "HANA database lectures March 2014. ©2013 SAP AG or an SAP affiliate company. All rights reserved.2 Outline Part 1 Motivation - Why main memory processing."— Presentation transcript:

1 HANA database lectures March 2014

2 ©2013 SAP AG or an SAP affiliate company. All rights reserved.2 Outline Part 1 Motivation - Why main memory processing What is main memory computing SAP HANA overview  Architecture  Usage ( SQL, Hana studio) Main memory Column Store  Row vs column store  Data model  Basic operations ( C ++- scan, AVX/SSSE scan)  Compression ( references, dictionary, index) Distribution  Scale out vs scale up  Data split  Parallelization

3 ©2013 SAP AG or an SAP affiliate company. All rights reserved.3 Outline Part 2 The insert/update problem : Delta table  data model  Data access ( insert only) / cost model  Data visibility  L2D – the state of the art approach for a delta table  L1D - discussions Transaction managememt  UDIV handling  MVCC  Tx lists Central operators  Joins ( i.e. semi join reducer)  Parallel aggregation  Sort

4 ©2013 SAP AG or an SAP affiliate company. All rights reserved.4 Outline Part 3 Transactional memory Distributed transactions Optimizer and query execution  Execution plans  Plan generation  Execution engine  Optimizer models  SQL versions ( SQL 92, 99 …) Persistency & delta  Mapping from main memory structures to persistency pages ( PAX)  Logging  Shadow page concept Text extensions  Text data model & operations

5 ©2013 SAP AG or an SAP affiliate company. All rights reserved.5 Two phase locking – definition The basic two-phase locking (2PL) protocol A transaction T must hold a lock on an item x in the appropriate mode before T accesses x. If a conflicting lock on x is being held by another transaction, T waits. Once T releases a lock, it cannot obtain any other lock subsequently. Note: a transaction is divided into two phases: A growing phase (obtaining locks) A shrinking phase (releasing locks) Claim : 2PL ensures conflict serializability

6 ©2013 SAP AG or an SAP affiliate company. All rights reserved.6 Transactions Two-Phase Locking : Abbreviated as 2PL Two lock modes: S (shared, read lock) X (exclusive, write lock) compatibility matrix: NoneSX SOk - Xok-- Held locks Acquired locks

7 ©2013 SAP AG or an SAP affiliate company. All rights reserved.7 2-phase locking -- example 1.S-lock(X) 2.A1 <- Read(X) 3.A1 <- A1 – k 4.X-lock(X) 5.Write(X, A1) 6.S-lock(Y) 7.A2 <- Read(Y) 8.A2 <- A2 + k 9.X-lock(Y) 10.Write(Y, A2) 11.Unlock(X) 12.Unlock(Y) 1.S-lock(X)  1.S-lock(X) 2.A1 <- Read(X) 3.A1 <- A1* X-lock(X) 5.Write(X, A1) 6.S-lock(Y) 7.A2 <- Read(Y) 8.A2 <- A2 * X-lock(Y) 10.Write(Y, A2) 11.Unlock(Y) 12.Unlock(X ) T1 T2 T2 waits Lock point for T1 Lock point for T2

8 Transactional memory TX paper Intel presentation TUM presentation Self tuning TSXpaperpresentation Self tuning TSX


Download ppt "HANA database lectures March 2014. ©2013 SAP AG or an SAP affiliate company. All rights reserved.2 Outline Part 1 Motivation - Why main memory processing."

Similar presentations


Ads by Google