SlideShare a Scribd company logo
April 28-29, 2016
Oracle Database
In-Memory & Multitenant
Mahir M. Quluzade
2 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Mahir M. Quluzade
 Oracle ACE
 AZEROUG (Azerbaijan Oracle User Group)
 TROUG (Turkish Oracle User Group)
 OCE 12c, 11g
 Author of OTech Magazine and OTN Articles
 Central Bank - Oracle DBA
 Oracle Blog : http//www.mahir-quluzade.com
3 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
What is
Oracle Multitenant?
4 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Oracle Database Architecture
 Oracle Instance
– SGA & PGA
– Background Processes
 Oracle Database
– Control Files
– Data Files
– Redo Logs (Online and Archived)
– Parameter and Password file
Pre-12c Oracle Database
5 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Oracle Database Architecture
Requires memory, processes and database files
System Resources
6 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
New Multitenant Architecture
Memory and processes required at multitenant container level only
System Resources
7 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
New Multitenant Architecture
Memory and processes required at multitenant container level only
System Resources
8 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Multitenant Architecture
Components of a Multitenant Container Database (CDB)
Pluggable Databases (PDBs)
PDBs
Root
CDB
CREATE DATABASE …
ENABLE PLUGGABLE DATABASE
Create CDB
CREATE PLUGGABLE DATABASE …
Create PDB
9 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Multitenant Architecture – Dynamics
 PDBs share common SGA and
background processes
 Foreground sessions see only
the PDB they connect to
10 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
What is
Oracle Database In-Memory?
11 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Oracle Database In-Memory Goals
12 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Breakthrough: Dual Format Database
13 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
What is
changed in Oracle Instance?
14 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
What is changed in Oracle Instance?
 SGA - System Global Area
– Buffer Cache
– Shared Pool
– Redo Buffer
– Large Pool
– Other Memory Areas
– In-Memory Area
 Background Processes
– DBWn
– LGWR
– …
– Wnnn (worker processes ora_w00n_db_name)
15 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Area
 Contains two sub-pools:
– IMCU pool: Stores In Memory Compression Units (IMCUs)
– SMU pool: Stores Snapshot Metadata Units
(SMUs)
 IMCUs contain column formatted data
 SMUs contain metadata and transactional
information
 In-Memory area is static area
– 1MB Pool – Populated Columns Data
– 64KB Pool – Objects Metadata
16 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
How to install
and configure Oracle Database In-Memory?
17 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
 Oracle Database In-Memory
automatically installed as part of
Oracle Database 12c Release 1
(12.1.0.2)
 But not enabled by default
Installing: Oracle Database In-Memory
19 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Area
 In-Memory control parameters starting “INMEMORY_” prefix
 Additional for optimizer control parameter OPTIMIZER_INMEMORY_AWARE
Core Initialization Parameters
20 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Starting in Oracle Database 12c Release 2 (12.2), can
increase INMEMORY_SIZE size dynamically by using
ALTER SYSTEM. If free memory is available in the
SGA, then the database allocates the memory to the IM
column store.
Note: You cannot use ALTER SYSTEM to reduce
INMEMORY_SIZE.
Enable In-Memory Area
SQL> alter system set memory_max_target=1324M scope=spfile;
SQL> alter system set inmemory_size=300M scope=spfile;
SQL> shutdown immediate;
SQL> startup
ORACLE instance started.
Total System Global Area 1392508928 bytes
Fixed Size 2924304 bytes
Variable Size 1040187632 bytes
Database Buffers 16777216 bytes
Redo Buffers 13852672 bytes
In-Memory Area 318767104 bytes
Database mounted.
Database opened.
21 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
How to configure In-Memory in Multitenant
Container Database?
22 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Parameters in Multitenant Container Database
 V$SYSTEM_PARAMETERS.ISPDB_MODIFIABLE
23 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Parameters in Multitenant Container Database
24 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
INMEMORY attributes in DDLs
25 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Populating In-Memory Colum Store
 SQL> CREATE TABLESAPCE users DATAFILE … INMEMORY;
 SQL> ALTER TABLESPACE users INMEMORY;
– All new tables and materialized views in this tablespace will be enabled for IM
column store by default.
INMEMORY attribute for Tablespaces
26 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Populating In-Memory Colum Store
 SQL> CREATE TABLE orders (ID NUMBER, …) INMEMORY;
 SQL> ALTER TABLE orders INMEMORY;
 Can exclude one or more not important columns for aggregation
– SQL> ALTER TABLE orders INMEMORY NO INMEMORY(createuser_id);
 Can disable IM Column Store for one or more partition
– SQL> ALTER TABLE orders MODIFY PARTITION orders_p2000 NO
INMEMORY;
INMEMORY attribute for Tables
27 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Populating In-Memory Colum Store
 SQL> CREATE MATERIALIZED VIEW sales_mv INMEMORY
SELECT * FROM SALES;
 SQL> SELECT table_name, inmemory, inmemory_priority,
inmemory_distribute, inmemory_compression
FROM user_tables
WHERE table_name = ‘SALES_MV';
TABLE_NAME INMEMORY INMEMORY_PRI INMEMORY_DISTRI INMEMORY_COMPRESS
---------- -------- ------------ --------------- -------------------
SALE_MV ENABLED NONE AUTO FOR QUERY LOW
INMEMORY attribute for Materialized Views
28 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Populating In-Memory Colum Store
 CRITICAL
– Object is populated immediately after the database is opened
 HIGH
 MEDIUM
 LOW
 NONE (default)
– Object only populated after they are scanned for the first time, if space available.
Controlled by the PRIORITY sub-clause of the INMEMORY clause
SQL> ALTER TABLE customers INMEMORY PRIORITY HIGH;
29 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Compression Levels
 NO MEMCOMPRESS
… Data is populated without any compression
 MEMCOMPRESSION FOR DML
… Minimal compression optimized for DML performance
 MEMCOMPRESSION FOR QUERY LOW
… Optimized for query performance (default)
 MEMCOMPRESSION FOR QUERY HIGH
… Optimized for query performance as well as space saving
 MEMCOMPRESSION FOR CAPACITY LOW
… Balanced with a greater bias towards as space saving
 MEMCOMPRESSION FOR CAPACITY HIGH
… Optimized for space saving
Controlled by the MEMCOMPRESS sub-clause of INMEMORY clause
30 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Compression Levels
Controlled by the MEMCOMPRESS sub-clause of INMEMORY clause
SQL> ALTER TABLE customers INMEMORY
2 MEMCOMPRESSION NO COMPRESSION;
SQL> ALTER TABLE customers INMEMORY
2 MEMCOMPRESSION FOR CAPACITY LOW;
31 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Compression Levels
 Use DBMS_COMPRESSION
 Applies MEMCOMPRESS to
sample set of data from a table
 Returns estimated compression
ratio
Controlled by the MEMCOMPRESS sub-clause of INMEMORY clause
32 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Column Store for RAC
 Each node in RAC have IM Column Store
– Same size recommended
– Object by default distributed across all nodes
 DISTRIBUTE BY ROWID RANGE
 DISTRIBUTE BY PARTITION
 DISTRIBUTE BY SUBPARTITION
– Consists of 1 IMCU objects distribute only one node
 Populate same object to IM Column Store on
every nodes
– Supported only Engineered Systems – EXADATA
– Using DUPLICATE clause
SQL> ALTER TABLE orders INMEMORY
2 DISTRIBUTE BY PARTITION;
SQL> ALTER TABLE orders INMEMORY
2 DUPLICATE ALL;
33 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
How Does
Database In-Memory Improve Performance?
34 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Querying the In-Memory Column Store
 Compressed Columnar Storage
 SIMD Vector Processing
 In-Memory Storage Indexes
 In-Memory Joins and Aggregations
35 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Compressed Columnar Storage
 Compressed Column Units
allows an analytic query
scan only data within the
required column
36 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
 The column format used in the IM column store has
been specifically designed to maximize the number of
column entries that can be loaded into the vector
registers on the CPU and evaluated in a single CPU
instruction
 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
 SIMD vector processing allows a set of column values
to be evaluated together in a single CPU instruction
SIMD Vector Processing
37 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Storage Indexes
 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
38 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Joins
 Bloom filters enable joins to be
converted into fast column scans
 Tried and true technology originally
released in 10g
 Same technique used to offload joins
on Exadata
39 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Joins
Example
SQL> SELECT *
2 FROM customer c,
3 orders o
4 WHERE c.id = o.customer_id
40 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Aggregations
 Without need to support objects such as indexes,
summary tables and materialized views
 New SQL Execution Operations
– KEY VECTOR and VECTOR GROUP BY
 Indicate plan is a vector transformation plan
 Vector transformation plan designed for
– Optimize queries involving aggregation and joins large
fact and multiple small dimension tables
– working with Star Queries
41 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
In-Memory Aggregations
 Vector Transformation Plan supports
– Aggregation operators :
 SUM, AVERAGE, MIN, MAX, STD and VARIANCE
 COUNT DISTINCT operations not supported by VECTOR GROUP BY
– The grouping syntax used in query is GROUP BY
 GROUPING SETS, GROUP BY ROLLUP not currently supported
– All joins must be equijoins
 Multiple columns of dimension table join the fact table with same join type
and same data type (for best performance, not be wrapped in a fuction )
42 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Vector Transformation Plan
SQL> SELECT t.calendar_year,
2 p.prod_category,
3 SUM(quantity_sold)
4 FROM times t,
5 products p,
6 sales f
7 WHERE t.time_id = f.time_id
8 AND p.prod_id = f.prod_id
9 GROUP BY t.calendar_year,
10 p.prod_category;
Example
43 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
What’s
coming with Oracle Database 12.2?
44 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
What is coming with Oracle Database 12.2 ?
 Starting in Oracle Database 12c Release 2 (12.2), can increase INMEMORY_SIZE size
dynamically by using ALTER SYSTEM.
 In-Memory Expressions (IM expressions)
– IM expressions populate the results of frequently evaluated query expressions into the In-Memory
Column Store. A candidate for an IM expression might be (monthly_sales*12)/52.
 In-Memory virtual columns (IM virtual columns)
– IM virtual columns enable the IM column store to materialized some or all virtual columns on a table.
 Active Data Guard will Support In-Memory
In-Memory Enhancements
45 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Additional Information
• Oracle Database 12c Release 12.1.0.2
Documentation
• Oracle Database In-Memory White Paper
• Oracle Database In-Memory Aggregation Paper
• When to use Oracle Database In-Memory
46 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com
Your Questions
http://www.mahir-quluzade.com
http://www.youtube.com/mahoora
https://twitter.com/marzade
https://www.linkedin.com/in/mahirquluzade
https://www.facebook.com/mahir.quluzade
Contacts
47 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com

More Related Content

PPTX
Oracle Multitenant - organized by Orient ITM - 12 Jul 2014
PPTX
Oracle Multitenant - Oracle Ankara Day 2014
PPT
IEEE Day 2013 - Best 10 New Features of Oracle Database 12c
PPTX
MySQL DBA
PDF
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
PDF
My First 100 days with a MySQL DBMS
PDF
MySQL For Oracle DBA's and Developers
PDF
MythBusters Globalization Support - Avoid Data Corruption
Oracle Multitenant - organized by Orient ITM - 12 Jul 2014
Oracle Multitenant - Oracle Ankara Day 2014
IEEE Day 2013 - Best 10 New Features of Oracle Database 12c
MySQL DBA
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
My First 100 days with a MySQL DBMS
MySQL For Oracle DBA's and Developers
MythBusters Globalization Support - Avoid Data Corruption

What's hot (20)

PDF
My First 100 days with an Exadata (WP)
PDF
REST in Piece - Administration of an Oracle Cluster/Database using REST
PDF
MySQL Enterprise Backup: PITR Partial Online Recovery
PPTX
Oracle 12c - Multitenant Feature
PDF
MySQL :What's New #GIDS16
PDF
Tx lf propercareandfeedmysql
PDF
MySQL 8.0 achitecture and enhancement
PDF
MySQL Enterprise Backup - BnR Scenarios
PDF
MySQL Performance Best Practices
PDF
MySQL Cluster Asynchronous replication (2014)
PDF
SOUG Day Oracle 21c New Security Features
PDF
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
PDF
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
PDF
Oracle RAC 12c Best Practices Sanger OOW13 [CON8805]
PDF
Exploring Oracle Database 12c Multitenant best practices for your Cloud
PDF
Oracle Failover Database Cluster with Grid Infrastructure 12c
PPT
Postgres Presentation
PDF
IaC MeetUp Active Directory Setup for Oracle Security LAB
PDF
MySQL For Oracle Developers
PDF
Introduction to MySQL
My First 100 days with an Exadata (WP)
REST in Piece - Administration of an Oracle Cluster/Database using REST
MySQL Enterprise Backup: PITR Partial Online Recovery
Oracle 12c - Multitenant Feature
MySQL :What's New #GIDS16
Tx lf propercareandfeedmysql
MySQL 8.0 achitecture and enhancement
MySQL Enterprise Backup - BnR Scenarios
MySQL Performance Best Practices
MySQL Cluster Asynchronous replication (2014)
SOUG Day Oracle 21c New Security Features
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
Oracle RAC 12c Best Practices Sanger OOW13 [CON8805]
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Oracle Failover Database Cluster with Grid Infrastructure 12c
Postgres Presentation
IaC MeetUp Active Directory Setup for Oracle Security LAB
MySQL For Oracle Developers
Introduction to MySQL
Ad

Viewers also liked (13)

PPTX
Oracle Day in Baku State University - Oracle Database Overview
PPTX
Mahir M. Quluzade - Oracle ASM : Ən çox soruşulan 5 sual
PPTX
Mahir M. Quluzade - Fərqli əməliyyat sistemləri eyni Data Guard Konfiqurasi...
PPTX
Mahir M. Quluzade - TROUG DAY2012 11.10.2012
PDF
Managing troubleshooting cluster_360dgrees
PDF
Troug 11 gnf
DOCX
Database Vault / Verinin Güvenliği
PDF
EM13c: Write Powerful Scripts with EMCLI
DOCX
Backup and Restore of database on 2-Node RAC
DOCX
how to protect your sensitive data using oracle database vault
PDF
Oracle 10g Database Server Kurulum
PDF
RMAN best practices for RAC
DOCX
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle Day in Baku State University - Oracle Database Overview
Mahir M. Quluzade - Oracle ASM : Ən çox soruşulan 5 sual
Mahir M. Quluzade - Fərqli əməliyyat sistemləri eyni Data Guard Konfiqurasi...
Mahir M. Quluzade - TROUG DAY2012 11.10.2012
Managing troubleshooting cluster_360dgrees
Troug 11 gnf
Database Vault / Verinin Güvenliği
EM13c: Write Powerful Scripts with EMCLI
Backup and Restore of database on 2-Node RAC
how to protect your sensitive data using oracle database vault
Oracle 10g Database Server Kurulum
RMAN best practices for RAC
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Ad

Similar to Oracle Database In-Memory & Multitenant - TROUG Days'16 Istanbul (20)

PDF
12c In Memory Management - Saurabh Gupta
PDF
Oracle Database In-Memory Meets Oracle RAC
PDF
Sloupcové uložení dat a použití in-memory technologií u řešení Exadata
PPTX
Oracle Database in-Memory Overivew
PPTX
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
PPTX
GLOC Keynote 2014 - In-memory
PDF
Oracle12c Database in-memory Data Sheet
PDF
Larry Ellison Introduces Oracle Database In-Memory
PDF
Oracle Database InMemory
PDF
Oracle Database In-Memory Advisor (English)
PDF
Oracle in-Memory Column Store for BI
PDF
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
PPTX
SQL 2014 In-Memory OLTP
PDF
Adding real time reporting to your database oracle db in memory
PPTX
P9 speed of-light faceted search via oracle in-memory option by alexander tok...
PDF
Oracle Database In-Memory Option for ILOUG
PDF
Oracle DB In-Memory technologie v kombinaci s procesorem M7
PDF
Efficient and scalable multitenant placement approach for in memory database ...
PDF
Oracle Database In-Memory
PDF
Oracle Database In_Memory Christian Antognini
12c In Memory Management - Saurabh Gupta
Oracle Database In-Memory Meets Oracle RAC
Sloupcové uložení dat a použití in-memory technologií u řešení Exadata
Oracle Database in-Memory Overivew
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
GLOC Keynote 2014 - In-memory
Oracle12c Database in-memory Data Sheet
Larry Ellison Introduces Oracle Database In-Memory
Oracle Database InMemory
Oracle Database In-Memory Advisor (English)
Oracle in-Memory Column Store for BI
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
SQL 2014 In-Memory OLTP
Adding real time reporting to your database oracle db in memory
P9 speed of-light faceted search via oracle in-memory option by alexander tok...
Oracle Database In-Memory Option for ILOUG
Oracle DB In-Memory technologie v kombinaci s procesorem M7
Efficient and scalable multitenant placement approach for in memory database ...
Oracle Database In-Memory
Oracle Database In_Memory Christian Antognini

Recently uploaded (20)

PPT
Quality review (1)_presentation of this 21
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
PDF
[EN] Industrial Machine Downtime Prediction
PPTX
IB Computer Science - Internal Assessment.pptx
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
Introduction to machine learning and Linear Models
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
SAP 2 completion done . PRESENTATION.pptx
PDF
Introduction to Data Science and Data Analysis
PPTX
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Quality review (1)_presentation of this 21
Introduction-to-Cloud-ComputingFinal.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Business Ppt On Nestle.pptx huunnnhhgfvu
Acceptance and paychological effects of mandatory extra coach I classes.pptx
STERILIZATION AND DISINFECTION-1.ppthhhbx
[EN] Industrial Machine Downtime Prediction
IB Computer Science - Internal Assessment.pptx
Clinical guidelines as a resource for EBP(1).pdf
Introduction to machine learning and Linear Models
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
SAP 2 completion done . PRESENTATION.pptx
Introduction to Data Science and Data Analysis
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
168300704-gasification-ppt.pdfhghhhsjsjhsuxush

Oracle Database In-Memory & Multitenant - TROUG Days'16 Istanbul

  • 1. April 28-29, 2016 Oracle Database In-Memory & Multitenant Mahir M. Quluzade
  • 2. 2 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Mahir M. Quluzade  Oracle ACE  AZEROUG (Azerbaijan Oracle User Group)  TROUG (Turkish Oracle User Group)  OCE 12c, 11g  Author of OTech Magazine and OTN Articles  Central Bank - Oracle DBA  Oracle Blog : http//www.mahir-quluzade.com
  • 3. 3 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com What is Oracle Multitenant?
  • 4. 4 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Oracle Database Architecture  Oracle Instance – SGA & PGA – Background Processes  Oracle Database – Control Files – Data Files – Redo Logs (Online and Archived) – Parameter and Password file Pre-12c Oracle Database
  • 5. 5 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Oracle Database Architecture Requires memory, processes and database files System Resources
  • 6. 6 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com New Multitenant Architecture Memory and processes required at multitenant container level only System Resources
  • 7. 7 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com New Multitenant Architecture Memory and processes required at multitenant container level only System Resources
  • 8. 8 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Multitenant Architecture Components of a Multitenant Container Database (CDB) Pluggable Databases (PDBs) PDBs Root CDB CREATE DATABASE … ENABLE PLUGGABLE DATABASE Create CDB CREATE PLUGGABLE DATABASE … Create PDB
  • 9. 9 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Multitenant Architecture – Dynamics  PDBs share common SGA and background processes  Foreground sessions see only the PDB they connect to
  • 10. 10 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com What is Oracle Database In-Memory?
  • 11. 11 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Oracle Database In-Memory Goals
  • 12. 12 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Breakthrough: Dual Format Database
  • 13. 13 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com What is changed in Oracle Instance?
  • 14. 14 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com What is changed in Oracle Instance?  SGA - System Global Area – Buffer Cache – Shared Pool – Redo Buffer – Large Pool – Other Memory Areas – In-Memory Area  Background Processes – DBWn – LGWR – … – Wnnn (worker processes ora_w00n_db_name)
  • 15. 15 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Area  Contains two sub-pools: – IMCU pool: Stores In Memory Compression Units (IMCUs) – SMU pool: Stores Snapshot Metadata Units (SMUs)  IMCUs contain column formatted data  SMUs contain metadata and transactional information  In-Memory area is static area – 1MB Pool – Populated Columns Data – 64KB Pool – Objects Metadata
  • 16. 16 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com How to install and configure Oracle Database In-Memory?
  • 17. 17 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com  Oracle Database In-Memory automatically installed as part of Oracle Database 12c Release 1 (12.1.0.2)  But not enabled by default Installing: Oracle Database In-Memory
  • 18. 19 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Area  In-Memory control parameters starting “INMEMORY_” prefix  Additional for optimizer control parameter OPTIMIZER_INMEMORY_AWARE Core Initialization Parameters
  • 19. 20 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Starting in Oracle Database 12c Release 2 (12.2), can increase INMEMORY_SIZE size dynamically by using ALTER SYSTEM. If free memory is available in the SGA, then the database allocates the memory to the IM column store. Note: You cannot use ALTER SYSTEM to reduce INMEMORY_SIZE. Enable In-Memory Area SQL> alter system set memory_max_target=1324M scope=spfile; SQL> alter system set inmemory_size=300M scope=spfile; SQL> shutdown immediate; SQL> startup ORACLE instance started. Total System Global Area 1392508928 bytes Fixed Size 2924304 bytes Variable Size 1040187632 bytes Database Buffers 16777216 bytes Redo Buffers 13852672 bytes In-Memory Area 318767104 bytes Database mounted. Database opened.
  • 20. 21 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com How to configure In-Memory in Multitenant Container Database?
  • 21. 22 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Parameters in Multitenant Container Database  V$SYSTEM_PARAMETERS.ISPDB_MODIFIABLE
  • 22. 23 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Parameters in Multitenant Container Database
  • 23. 24 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com INMEMORY attributes in DDLs
  • 24. 25 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Populating In-Memory Colum Store  SQL> CREATE TABLESAPCE users DATAFILE … INMEMORY;  SQL> ALTER TABLESPACE users INMEMORY; – All new tables and materialized views in this tablespace will be enabled for IM column store by default. INMEMORY attribute for Tablespaces
  • 25. 26 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Populating In-Memory Colum Store  SQL> CREATE TABLE orders (ID NUMBER, …) INMEMORY;  SQL> ALTER TABLE orders INMEMORY;  Can exclude one or more not important columns for aggregation – SQL> ALTER TABLE orders INMEMORY NO INMEMORY(createuser_id);  Can disable IM Column Store for one or more partition – SQL> ALTER TABLE orders MODIFY PARTITION orders_p2000 NO INMEMORY; INMEMORY attribute for Tables
  • 26. 27 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Populating In-Memory Colum Store  SQL> CREATE MATERIALIZED VIEW sales_mv INMEMORY SELECT * FROM SALES;  SQL> SELECT table_name, inmemory, inmemory_priority, inmemory_distribute, inmemory_compression FROM user_tables WHERE table_name = ‘SALES_MV'; TABLE_NAME INMEMORY INMEMORY_PRI INMEMORY_DISTRI INMEMORY_COMPRESS ---------- -------- ------------ --------------- ------------------- SALE_MV ENABLED NONE AUTO FOR QUERY LOW INMEMORY attribute for Materialized Views
  • 27. 28 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Populating In-Memory Colum Store  CRITICAL – Object is populated immediately after the database is opened  HIGH  MEDIUM  LOW  NONE (default) – Object only populated after they are scanned for the first time, if space available. Controlled by the PRIORITY sub-clause of the INMEMORY clause SQL> ALTER TABLE customers INMEMORY PRIORITY HIGH;
  • 28. 29 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Compression Levels  NO MEMCOMPRESS … Data is populated without any compression  MEMCOMPRESSION FOR DML … Minimal compression optimized for DML performance  MEMCOMPRESSION FOR QUERY LOW … Optimized for query performance (default)  MEMCOMPRESSION FOR QUERY HIGH … Optimized for query performance as well as space saving  MEMCOMPRESSION FOR CAPACITY LOW … Balanced with a greater bias towards as space saving  MEMCOMPRESSION FOR CAPACITY HIGH … Optimized for space saving Controlled by the MEMCOMPRESS sub-clause of INMEMORY clause
  • 29. 30 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Compression Levels Controlled by the MEMCOMPRESS sub-clause of INMEMORY clause SQL> ALTER TABLE customers INMEMORY 2 MEMCOMPRESSION NO COMPRESSION; SQL> ALTER TABLE customers INMEMORY 2 MEMCOMPRESSION FOR CAPACITY LOW;
  • 30. 31 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Compression Levels  Use DBMS_COMPRESSION  Applies MEMCOMPRESS to sample set of data from a table  Returns estimated compression ratio Controlled by the MEMCOMPRESS sub-clause of INMEMORY clause
  • 31. 32 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Column Store for RAC  Each node in RAC have IM Column Store – Same size recommended – Object by default distributed across all nodes  DISTRIBUTE BY ROWID RANGE  DISTRIBUTE BY PARTITION  DISTRIBUTE BY SUBPARTITION – Consists of 1 IMCU objects distribute only one node  Populate same object to IM Column Store on every nodes – Supported only Engineered Systems – EXADATA – Using DUPLICATE clause SQL> ALTER TABLE orders INMEMORY 2 DISTRIBUTE BY PARTITION; SQL> ALTER TABLE orders INMEMORY 2 DUPLICATE ALL;
  • 32. 33 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com How Does Database In-Memory Improve Performance?
  • 33. 34 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Querying the In-Memory Column Store  Compressed Columnar Storage  SIMD Vector Processing  In-Memory Storage Indexes  In-Memory Joins and Aggregations
  • 34. 35 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Compressed Columnar Storage  Compressed Column Units allows an analytic query scan only data within the required column
  • 35. 36 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com  The column format used in the IM column store has been specifically designed to maximize the number of column entries that can be loaded into the vector registers on the CPU and evaluated in a single CPU instruction  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  SIMD vector processing allows a set of column values to be evaluated together in a single CPU instruction SIMD Vector Processing
  • 36. 37 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Storage Indexes  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
  • 37. 38 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Joins  Bloom filters enable joins to be converted into fast column scans  Tried and true technology originally released in 10g  Same technique used to offload joins on Exadata
  • 38. 39 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Joins Example SQL> SELECT * 2 FROM customer c, 3 orders o 4 WHERE c.id = o.customer_id
  • 39. 40 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Aggregations  Without need to support objects such as indexes, summary tables and materialized views  New SQL Execution Operations – KEY VECTOR and VECTOR GROUP BY  Indicate plan is a vector transformation plan  Vector transformation plan designed for – Optimize queries involving aggregation and joins large fact and multiple small dimension tables – working with Star Queries
  • 40. 41 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com In-Memory Aggregations  Vector Transformation Plan supports – Aggregation operators :  SUM, AVERAGE, MIN, MAX, STD and VARIANCE  COUNT DISTINCT operations not supported by VECTOR GROUP BY – The grouping syntax used in query is GROUP BY  GROUPING SETS, GROUP BY ROLLUP not currently supported – All joins must be equijoins  Multiple columns of dimension table join the fact table with same join type and same data type (for best performance, not be wrapped in a fuction )
  • 41. 42 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Vector Transformation Plan SQL> SELECT t.calendar_year, 2 p.prod_category, 3 SUM(quantity_sold) 4 FROM times t, 5 products p, 6 sales f 7 WHERE t.time_id = f.time_id 8 AND p.prod_id = f.prod_id 9 GROUP BY t.calendar_year, 10 p.prod_category; Example
  • 42. 43 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com What’s coming with Oracle Database 12.2?
  • 43. 44 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com What is coming with Oracle Database 12.2 ?  Starting in Oracle Database 12c Release 2 (12.2), can increase INMEMORY_SIZE size dynamically by using ALTER SYSTEM.  In-Memory Expressions (IM expressions) – IM expressions populate the results of frequently evaluated query expressions into the In-Memory Column Store. A candidate for an IM expression might be (monthly_sales*12)/52.  In-Memory virtual columns (IM virtual columns) – IM virtual columns enable the IM column store to materialized some or all virtual columns on a table.  Active Data Guard will Support In-Memory In-Memory Enhancements
  • 44. 45 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Additional Information • Oracle Database 12c Release 12.1.0.2 Documentation • Oracle Database In-Memory White Paper • Oracle Database In-Memory Aggregation Paper • When to use Oracle Database In-Memory
  • 45. 46 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com Your Questions http://www.mahir-quluzade.com http://www.youtube.com/mahoora https://twitter.com/marzade https://www.linkedin.com/in/mahirquluzade https://www.facebook.com/mahir.quluzade Contacts
  • 46. 47 Oracle Database In-Memory - Mahir M. Quluzade © 2016 http://www.mahir-quluzade.com

Editor's Notes

  • #5: Oracle Database 11g Architecture is non-CDB. Oracle Instance : SGA & PGA + Background Processes Oracle Database: Control Files, Data Files, Redo logs (Online and Archived), Parameter and Password files. Memory and Background Processes – Oracle Instance Storage - Database Files
  • #6: Let's think about our traditional Oracle Database architecture. Every time we create a database, be it a production database, a development or a test database, what do we do? We create a set of files, we allocate a bunch of memory for managing the data, and we kick off a series of background processes. And this is replicated for every one of the databases that we create. As more and more databases are fired up, these replicated overheads quickly consume the available server resources and this limits the number of applications we can run on any given server. You can see how quickly we red-line the little resource meter here.
  • #7: With Oracle Database 12c, we have a new multitenant architecture, featuring pluggable databases. We can now create a single multitenant container database. Into this we can plug multiple pluggable databases.
  • #8: Now, the beauty of this new architecture is we don't need to make changes to our existing applications. More importantly, we now only allocate one chunk of memory and one set of background processes for that container database. So that's going to give us much greater utilization out of our existing IT resources. We’ll be able to host many more applications per database server. So it's going to give us much greater scalability as we consolidate multiple pluggable databases into our new multitenant container database.
  • #9: Let’s look at the components of a multitenant container database We have the pluggable databases or PDBs There are two parts to the term pluggable databases; There’s “pluggable”, which is new and “databases” which is familiar. Before we get to the revolutionary new stuff let’s discuss what hasn’t changed. A pluggable database is a fully functional self-contained Oracle database. It’s not watered down in any way. From the perspective of an application or an end user it hasn’t changed at all. This is very important because it means that no application changes are required to adopt this new architecture. [click] We introduce a new concept: a root database [click] Into which are plugged various PDBs [click] And the combination is referred to as a multitenant container database or CDB
  • #10: The multitenant container database behaves as a single database from the operations point of view. We only have a single set of Oracle background processes and a single, shared database memory requirement for the entire CDB, Shared across all PDBs plugged into it. This gives us very high consolidation density; in other words more applications per server. This affords maximum reduction in capital expenses.