Oracle 12c OLAP Embedded Analytics - · PDF fileOracle 12c OLAP Embedded Analytics Phani . 2...

35
Oracle 12c OLAP Embedded Analytics Phani

Transcript of Oracle 12c OLAP Embedded Analytics - · PDF fileOracle 12c OLAP Embedded Analytics Phani . 2...

Oracle 12c OLAP Embedded Analytics

Phani

2

Agenda

• Workload Type

• Basic Architecture

• Terminology

• Deployment

• Optimization

• Oracle 12c – InMemory option

• Role of InMemory in OLAP Analytics

• Hardware Design

• Need for Engineered Systems

• Results

3

Workload Types - Intro

Oracle 12c OLAP

• OLTP

• OLAP

• OLTP & OLAP – Mixed Workload

4

Why OLAP

• New / Unknown users

• Results Showcase

• Performance and Faster Results

• Adhoc Queries

• Access Pattern

• Multi Dimensional

• Trending and Forecast

5

Introduction & Important Features

Oracle 12c

• Multi-Tenant Architecture

• Rapid Provisioning with Cloning

• Easier Patch Management

• Consolidation

• In Memory option

6

Architecture

Oracle 12c OLAP

Image Source: Oracle documentation, specific Trademark / Copyright / symbols belong to / owned by the respective companies

As the presentation goes, some terms and images have been used / leveraged from Oracle documentation and Google search source, strictly used for presentation in conference there is no intention of copying / commercial usage

7

Terms

Oracle 12c OLAP

• Analytic Workspace

• Dimensions

• Cubes

• Hierarchies

8

Oracle 12c OLAP

9

Oracle 12c OLAP

10

Oracle 12c OLAP

11

Oracle 12c OLAP

12

Oracle 12c OLAP

13

Oracle 12c OLAP

14

Oracle 12c OLAP

15

Oracle 12c OLAP

16

Oracle 12c OLAP

17

Oracle 12c OLAP

18

Oracle 12c OLAP

19

Optimization

Oracle 12c OLAP

• OLAP Cubes Partitioning – Small Data Structures

– Small working set

– Simplified management

• Incremental Updates

20

Introduction & Important Features

Oracle 12c

• Multi-Tenant Architecture

• Rapid Provisioning with Cloning

• Easier Patch Management

• Consolidation

• In Memory option

21

In-Memory Option Goals

• 100x Faster queries: real-time analytics queries

• Supports Dual format architecture

• No need to change application side

• Supports multitenant Architecture

22

InMemory Option

• Column Format

• Table level / Partition level / Column etc

• Define Compression

• CPU locality Scanning

• Size @ CDB, customized @ PDB

• EM monitoring

23

InMemory Option

• InMemory Scans

• InMemory Storage Index (Min and Max)

• CPU locality reference

• More Data Value Processing

24

Row Format vs Column Format:

Dual Format Architecture

SALES

ROW FORMAT: Transactions run faster on row format

Fast for processing few rows, many columns

CUST ID PROD ID TIME ID CHAN ID QTT AMOUNT row1 112 ABC 12-Apr Ch1 12 254 row2 234 FDF 2-Jan Ch2 4 456 row3 456 DFD 10-Sep Ch3 8 500 row4 213 GRT 7-Aug Ch4 1 100

ROW FORMAT

order1 order2 order3 order4

Col1 CUST ID 112 234 456 213

Col2 PROD ID ABC FDF DFD GRT

Col3 TIME ID 12-Apr 2-Jan 10-Sep 7-Aug

Col4 CHN ID Ch1 ch2 ch3 ch4

Col5 QTT 12 4 8 1

Col6 AMOUNT 254 456 500 100

Column Format

ROW FORMAT: Transactions run faster on row format

Fast for processing few rows, many columns

COLUMN FORMAT:

Analytics run faster on column format

Fast for processing few columns, many rows

25

IM-Column Store

• It is an optional, static SGA pool that stores copies of tables and partitions in a special columnar format optimized for rapid scans.

• The IM column store does not replace the buffer cache, but acts as a supplement so that both memory areas can store the same data in different formats.

• IM size is controlled by the initialization parameter INMEMORY_SIZE (default 0).

• It will not take effect until the database instance is restarted.

• IMCO- it schedule the objects to populate into the IM column store.

• SMCO- it dynamically spawns the wnnn process and to implement the tasks.

• The In-Memory area is sub-divided into two pools:

1MB pool used to store the actual column formatted data

64K pool used to store metadata about the objects.

26

Compression Levels Compression Level Description

NO MEMCOMPRESS Data is populated without any compression

MEMCOMPRESS FOR DML Minimal compression optimized for DML performance

MEMCOMPRESS FOR QUERY LOW Optimized for query performance (default)

MEMCOMPRESS FOR QUERY HIGH Optimized for query performance as well as space saving

MEMCOMPRESS FOR CAPACITY LOW Balanced with a greater bias towards space saving

MEMCOMPRESS FOR CAPACITY HIGH Optimized for space saving

27

In-Memory Column store on RAC • IM Column store should be equally sized in each RAC node

• In Cluster, distribution of objects are controlled by two additional sub cluases to the In-Memory Attribute : DISTRIBUTE and DUPLICATE

• EX:- alter table p inmemory distribute by partition;

• EX:- alter table test inmemory duplicate all;

NODE 1

NODE 3 NODE 4

P1

NODE 2

P2

P3 P4

NODE 1

NODE 4

NODE 3

NODE 2

T T

T T

28

InMemory Option

• Alter table sales inmemory;

• Alter table sales inmemory no inmemry(prod_type)

• Alter table sales inmemory priority CRITICAL;

• Alter table sales inmemory NOCOMPRESSION;

29

Views

Monitoring and Diagnosing

• V$IM_SEGMENTS/V$IM_USER_SEGMENTS --- IM Status of all/user SEGMENTS

• V$IM_COLUMN_LEVEL ---IM status of all columns of segments

Log File

• In <ADR Home>/log/imdb_<sid>.log

c:0o:114184d:115968/St.RDBA: 0x642fa04 No.blks: 508

c:0o:114184d:115968/St.RDBA: 0x7013a04 No.blks: 508

c:0o:114184d:115968/rows buff: 592980

c:0o:114184d:115968/rows buff: 591463

NO BLOCKS POPULATED

NO ROWS IN THE BUFFER CACHE

30

OLAP infrastructure Design

• Hardware Design for OLAP – Server,

– Network,

– Storage infrastructure design

– Best Practices

31

Need for Engineered Appliance in OLAP

Interconnect

32

Engineered Solutions

• Pre Configured

• Factory Installed

• Easier Support Model

• Best tuned to work and compatible

• Best performance

33

DAAD Performance

34

Results DEMO

35

Thank You