44
Cris Pedregal, CMTS Oracle Database Development Deivis Campo, Project Manager EDR Consultores June 2015 Oracle Confidential – Internal/Restricted/Highly Restricted Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Database In-Memory The Next Big Thing

Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Cris Pedregal, CMTS Oracle Database Development Deivis Campo, Project Manager EDR Consultores June 2015

Oracle Confidential – Internal/Restricted/Highly Restricted Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Oracle Database In-Memory The Next Big Thing

Page 2: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

2

Page 3: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Why is Oracle doing this

Page 4: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Accelerate Mixed Workload OLTP

Real Time Analytics

No Changes to Applications

Trivial to Implement

Oracle Database In-Memory Goals

100x

4

Page 5: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

What is an analytic query?

Which products give us our highest

margins?

Who are the top 10 sales reps in the north

west region this month?

If I get a 20% discount on widget A, how

much will our margins improve?

Page 6: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

What is an analytic query?

SALES

CUSTOMERS

SUPPLIERS

PARTS TIME

STORES

STAR SCHEMA

Page 7: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

What is an analytic query?

• Scans a large amount of data • Selects a subset of columns from wide tables • Uses filter predicates in the form of =, >, <, between, in-list • Uses selective join predicates that reduce the amount of data returned • Contain complex calculations or aggregations

Page 8: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Row Format Databases vs. Column Format Databases

Rows Stored Contiguously

Transactions run faster on row format

– Example: Query or Insert a sales order – Fast processing few rows, many columns

Columns Stored

Contiguously

Analytics run faster on column format

– Example : Report on sales totals by region – Fast accessing few columns, many rows

SALES

SALES

8

Page 9: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

OLTP Example

9

Row

Query a single sales order in row format

– One contiguous row accessed = FAST

Column

Query a sales order in Column Format

– Many column accessed = S L O W

SALES

Stores SALES

Query

Query Query

Query Query

Until Now Must Choose One Format and Suffer Tradeoffs

Page 10: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

What is it

Page 11: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Breakthrough: Dual Format Database

• BOTH row and column formats for same table

• Simultaneously active and transactionally consistent

• Analytics & reporting use new in-memory Column format

• OLTP uses proven row format

11

Normal Buffer Cache

New In-Memory Format

SALES SALES

Row Format

Column Format

SALES

Page 12: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Populating : In-Memory Column Store

• Pure in-memory column format • Not persistent, and no logging • Quick to change data: fast OLTP

• Enabled at table or partition

• Only active data in-memory

• 2x to 20x compression typical

• Available on all hardware platforms

12

SALES

Pure In-Memory Columnar

Page 13: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Why is it faster

Page 14: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Why is an In-Memory scan faster than the buffer cache?

SELECT COL4 FROM MYTABLE;

14

X X X X X

RESULT

Row Format

Buffer Cache

Page 15: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Why is an In-Memory scan faster than the buffer cache?

SELECT COL4 FROM MYTABLE;

15

RESULT

Column Format

IM Column Store

RESULT

X X X X X

Page 16: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Oracle In-Memory Column Store Storage Index • Each column is the made up

of multiple column units

• Min / max value is recorded for each column unit in a storage index

• Storage index provides partition pruning like performance for ALL queries

16

Memory

SALES Column Format

Min 1 Max 3

Min 4 Max 7

Min 8 Max 12

Min 7 Max 15

Example: Find all sales from stores with a store_id of 8

?

Page 17: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

2 to 3 Orders of Magnitude Faster Analytic Data Scans

• Each CPU core scans local in-memory columns

• Scans use super fast SIMD vector instructions • Originally designed for

graphics & science

• Billions of rows/sec scan rate per CPU core • Row format is millions/sec

17

Vect

or R

egist

er Load

multiple region values

Vector Compare all values an 1 cycle

CPU

Memory

REG

ION

CA

CA CA

CA

Example: Find sales in region of CAlifornia

> 100x Faster

Page 18: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Joining and Combining Data Also Dramatically Faster

• Converts joins of data in multiple tables into fast column scans

• Joins tables 10x faster

18

Example: Find total sales in outlet stores

Sales Stores

Stor

e ID

StoreID in 15, 38, 64

Type=‘Outlet’

Type

Sum

Stor

e ID

Amou

nt

Page 19: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Generates Reports Instantly

• Dynamically creates in-memory report outline

• Then report outline filled-in during fast fact scan

• Reports run much faster • Without predefined cubes

• Also offloads report filtering to Exadata Storage servers

19

Example: Report sales of footwear in outlet stores

Sales

Stores

Products In-Memory

Report Outline

Footwear

Out

lets

$ $$

$ $$$

Footwear

Sales Outlets

Page 20: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

How does it impact OLTP environments

Page 21: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Complex OLTP is Slowed by Analytic Indexes

• Most Indexes in complex OLTP (e.g. ERP) databases are only used for analytic queries

• Inserting one row into a table requires updating 10-20 analytic indexes: Slow!

• Indexes only speed up predictable queries & reports

Table 1 – 3 OLTP

Indexes

10 – 20 Analytic Indexes

21

Page 22: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Column Store Replaces Analytic Indexes

• Fast analytics on any columns • Better for unpredictable analytics

• Less tuning & administration

• Column Store not persistent so update cost is much lower • OLTP & batch run faster

Table 1 – 3 OLTP

Indexes In-Memory Column Store

22

Page 23: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

How can I scale this solution

Page 24: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Scale-Out In-Memory Database to Any Size

• Scale-Out across servers to grow memory and CPUs

• In-Memory queries parallelized across servers to access local column data

• Direct-to-wire InfiniBand protocol speeds messaging on Engineered Systems

24

Page 25: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

In-Memory Speed + Capacity of Low Cost Disk

DISK

PCI FLASH

DRAM

Cold Data

Hottest Data

Active Data

• Size not limited by memory

• Data transparently accessed across tiers

• Each tier has specialized algorithms & compression

• Simultaneously Achieve: • Speed of DRAM • I/Os of Flash • Cost of Disk

25

Page 26: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Scale-Up for Maximum In-Memory Performance

M6-32 Big Memory Machine

32 TB DRAM

32 Socket

3 Terabyte/sec Bandwidth

• Scale-Up on large SMPs • Algorithms NUMA optimized

• SMP scaling removes overhead of distributing queries across servers

• Memory interconnect far faster than any network

26

Page 27: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

How will this impact my HA solution

Page 28: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Oracle In-Memory: Industrial Strength Availability

RAC

ASM

RMAN

Data Guard & GoldenGate

• Pure In-Memory format does not change Oracle’s storage format, logging, backup, recovery, etc.

• All Oracle’s proven availability technologies work transparently

• Protection from all failures • Node, site, corruption, human error, etc.

28

Page 29: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Oracle Database In-Memory: Unique Fault Tolerance

• Similar to storage mirroring

• Duplicate in-memory columns on another node

• Enabled per table/partition • E.g. only recent data

• Application transparent

• Downtime eliminated by using duplicate after failure

29

Only Available on Engineered Systems

Page 30: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

How easy is it to get started

Page 31: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Oracle In-Memory: Simple to Implement

1. Configure Memory Capacity • inmemory_size = XXX GB

2. Configure tables or partitions to be in memory • alter table | partition … inmemory;

3. Mark analytic indexes invisible • Drop them once confirmed not needed to speed up OLTP

31

Page 32: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Oracle In-Memory Requires Zero Application Changes

Full Functionality - ZERO restrictions on SQL Easy to Implement - No migration of data Fully Compatible - All existing applications run unchanged Fully Multitenant - Oracle In-Memory is Cloud Ready

Uniquely Achieves All In-Memory Benefits With No Application Changes

32

Page 33: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

How Are Customers Using Oracle Database In-Memory

Page 34: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

EDR Consultants – www.edr.com.ve

Who we are

Ejecutivos D. Ragot. (EDR Consultores) provides IT consulting service

Mission EDR’s mission is to improve our customers business processes while using business intelligence. Services

Product Development using Oracle Developer Suite (for Business Intelligence); Java, Weblogic and Data Warehousing

34

Page 35: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

EDR BInsurance and Gesban

35

Business Intelligence for the Banking Industry

Real Time monitoring of profitability, customer transactions, costs, benchmarking, etc.

Business Intelligence for the Insurance Industry

Real Time Performance Management and Decision Support: Underwriting, Claims, Claims Adjustment, Risk, Marketing, Accounting, Finance, Reinsurance

EDR BInsurance

Gesban

Built on Oracle Business Intelligence

Page 36: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

BInsurance and Database In-Memory

• Improvement with In-Memory – Average: 2.2 x – Maximum: 5.6 x

36

PoV System: Oracle X5-2, 256 GB

Page 37: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

Gesban and Database In-Memory

37

• Improvement with In-Memory – Average: 6.5 x – Maximum: 28 x

PoV System: Oracle X5-2, 256 GB

Page 38: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

Case Study: Scan Intensive Queries Database In-Memory: Faster Scans and Memory Efficiency

• Gesban “Clientes” reports benefit from increased buffer cache (SGA) and DBIM column store

• Getting performance from traditional architectures: – Fast (expensive) Storage, or – Pinning a table in memory (uncompressed)

• Row store (best for transactions) • Database In-Memory Benefits

– Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11-28 x here

• Efficient Memory usage with DBIM – In-Memory Compression

• 2.2 GB to 324 MB (6.9x here) • Table(s) will continue to grow – continue to compress

– Store more tables in memory – Continually revisit deployment decisions with traditional

approach 38

PoV System: Oracle X5-2, 256 GB

Page 39: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

Ragot and Database In-Memory: Key Learnings

• Straight forward upgrade from Database 11g to 12c • Simple to implement Database In-Memory • No application code changes were required • Purchase as much memory as you can afford and increase the SGA size

accordingly • Use Database In-Memory Option to further improve in memory table scan

performance – Analytic reports benefit from increased memory and DBIM (column store and

compression) • Data scan centric queries (e.g. Gesban “Clientes” reports) benefit with larger SGA

(memory for DBIM)

www.edr.com.ve

39

Page 40: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2014 EDT and Oracle. All rights reserved.

Customer Business Benefits When Running BI Insurance and Gesban with Database In-Memory

• Best performance achieved with Database In-Memory – Real time dashboards, statistics and business indicators for decision support – Lines of Business to create more well defined strategies in less time

• Build more complex queries, allowing more accurate data mining – Identify the most profitable businesses, minimize risk and reduce costs

• Increase ROI with higher data compression and faster queries • Lower TCO with lower CPU utilization • Achieving Optimized status provides faster time to value with integrated

systems and easier implementations.

40

Ragot Applications run best with Oracle Database In-Memory providing our customers with unparalleled scalability and lower TCO

Page 41: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Accelerate Mixed Workload OLTP

Real Time Analytics

No Changes to Applications

Trivial to Implement

Oracle Database In-Memory Goals

100x

41

Page 42: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Where can I get more information

Page 43: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Join the Conversation

43

https://twitter.com/db_inmemory https://blogs.oracle.com/in-memory/

Related White Papers • Oracle Database In-Memory White Paper • Oracle Database In-Memory Aggregation Paper • When to use Oracle Database In-Memory • Oracle Database In-Memory Advisor

Related Database In-Memory Free Webcasts • Oracle Database In-Memory meets Data Warehousing

Related Videos • In-Memory YouTube Channel • Database Industry Experts Discuss Oracle Database In-Memory (11:10) • Software on Silicon Any Additional Questions

• Oracle Database In-Memory Blog • By email: [email protected]

https://www.facebook.com/OracleDatabase

http://www.oracle.com/goto/dbim.html

Additional Resources

Page 44: Oracle Database In-Memory · • Database In- Memory Benefits – Column store (best for analytics) – Scanned much faster than buffer cache – Faster scanning: 11- 28 x here •