SlideShare a Scribd company logo
1 of 37
Download to read offline
Zohar Elkayam 
CTO, Brillix 
Zohar@Brillix.co.il 
Twitter: @realmgic 
Oracle Database In Memory Option
Agenda 
•About in memory stores 
•About column stores 
•Introduction to Database In Memory –Oracle In Memory Option 
•How to use DBIM 
•Short demo 
2 http://brillix.co.il
Who am I? 
•Zohar Elkayam, CTO at Brillix 
•Oracle ACE Associate 
•DBA, team leader, instructor and senior consultant for over 16 years 
•Editor (and manager) of ilDBA –Israel Database Community 
•Blogger –www.realdbamagic.com 
3 http://brillix.co.il
What are In Memory Databases and Column Stores? 
4 http://brillix.co.il
What is a In Memory Database? 
In memory databases are management systems that keeps the data in a non-persistent storage (RAM) for faster access 
Examples: 
•MemcacheDB 
•Oracle TimesTen 
5 http://brillix.co.il
What is a Column Store Database? 
•Column Store databases are management systems that uses data managed in a columnar structure format for better analysis of single column data (i.e. aggregation). Data is saved and handled as columns instead of rows. 
Examples: 
•Vertica 
•GreenPlum 
•HBase 
6 http://brillix.co.il
How Records are Organized? 
•This is a logical table in RDBMS systems 
•Its physical organization is just like the logical one: column by column, row by row 
Row 1 
Row 2 
Row 3 
Row 4 
Col 1 
Col 2 
Col 3 
Col 4 
7 http://brillix.co.il
Query Data 
•When we query data, records are read at the order they are organized in the physical structure 
•Even when we query a single column, we still need to read the entire table and extract the column 
Row 1 
Row 2 
Row 3 
Row 4 
Col 1 
Col 2 
Col 3 
Col 4 
Select Col2 From MyTable 
Select * From MyTable 
8 http://brillix.co.il
How Does Column Store Save Data 
Organization in row store 
Organization in column store 
10 http://brillix.co.il
Row Format vs. Column Format 
11 http://brillix.co.il
Column Store Limitations 
•Most Column stores avoid or limit online transactions 
•Most Column stores avoid data changes (updates) and implement it as insert/delete 
•Columnar organization is very good for large quantities of data but is not very efficient when storing smaller amounts of data 
•Column store SQL might be somewhat different from ANSI SQL 
12 http://brillix.co.il
In Memory Option 
13 http://brillix.co.il
In Memory Option Breakthrough 
•In memory option introduces a dual format database 
•Tables can be accessed as row format and column format at the same time –the Optimizer is aware to the new format so: 
•OLTP continue using the old row format 
•Analytic queries start using the column format 
14 http://brillix.co.il
In-Memory Option 
•Column data is pure in memory format and therefor is non- persistent and require no logging, archiving or backup 
•Data changes are simultaneously changed in both formats so data is consistent 
•Since the data is column based, it has better compression ratio and more data can be stored in memory 
•There are no changes to the application required –just turn on and start using 
15 http://brillix.co.il
Order of Magnitude Faster 
•Customer report analytic queries run 10 to 1000 times faster 
•Since less analytic Indexes are needed, OLTP run faster too 
•Data processing is done using SIMD Vector Instruction so billions of records can be handled by a single CPU 
16 http://brillix.co.il
In Memory Option –Good To Know 
•Oracle 12.1.0.2 feature –additional license required 
•It is NotIn Memory Database –it’s an accelerator to our current database 
•It is NotColumn Store Database –it allows keeping some of our data in column store which is non-persistent 
•It has nothing to do with Times-Ten or Oracle Coherence 
17 http://brillix.co.il
More Good to Know 
•In memory option does not work on an Active Data Guard standby database but roadmap does contains this feature in the future. It does work on logical standby database 
•Optimization of the execution plan in regards of using the DBIM might (and probably will) change in future versions 
•Known bugs: no functionality bugs known at this time but there is a known bug around the license auditing of this feature 
18 http://brillix.co.il
How To Use DBIM? 
19 http://brillix.co.il
How to Configure 
•Configure memory capacity 
•The amount of memory allocated must be larger than the amount of data loaded (after compression). We should also allow some spare memory for maintenance. 
•Configure tablespaces, tables, partitions, sub-partitions or columns to be in memory: 
•Optional: drop unused OLTP indexes –those who used for analytics. 
inmemory_size= xxx GB 
alter table | partition ...inmemory; 
20 http://brillix.co.il
Startup 
SQL> startup 
ORACLE instance started. 
Total System Global Area 5368709120 bytes 
Fixed Size 3056960 bytes 
Variable Size 620759744 bytes 
Database Buffers 1509949440 bytes 
Redo Buffers 13717504 bytes 
In-Memory Area 3221225472 bytes 
Database mounted. 
Database opened. 
21 http://brillix.co.il
Parameters Related to In Memory Option 
SQL> show parameter inmememory 
NAME TYPE VALUE 
----------------------------------------------------------------------------- 
inmemory_clause_defaultstring 
inmemory_forcestring DEFAULT 
inmemory_max_populate_serversinteger 2 
inmemory_querystring ENABLE 
inmemory_sizebig integer 3G 
inmemory_trickle_repopulate_servers_ integer 1 
percent 
optimizer_inmemory_awarebooleanTRUE 
22 http://brillix.co.il
Where Does the In Memory Resides? 
•In Memory is part of the SGA –adding this buffer will require changing the SGA size 
Shared pool 
Buffercache 
Redo logbuffer 
Streams pool 
Large pool 
Java pool 
System Global Area (SGA) 
KEEP buffer pool 
RECYCLE buffer pool 
nKbuffer cache 
Column Store In Memory Buffer 
23 http://brillix.co.il
Checking Table Settings 
SQL> r 
1 SELECT table_name, 
2 inmemory, 
3 inmemory_priority, 
4 inmemory_distribute, 
5 inmemory_compression, 
6 inmemory_duplicate 
7 FROM user_tables 
8* ORDER BY table_name 
TABLE_NAME INMEMORY INMEMORYINMEMORY_DISTRI INMEMORY_COMPRESS INMEMORY_DUPL 
--------------------------------------------------------------------------------- 
PEOPLE ENABLED HIGH AUTO FOR QUERY LOW NO DUPLICATE 
PEOPLE2 DISABLED 
TOWNS DISABLED 
24 http://brillix.co.il
Managing In Memory at the Column Level 
•Setting a table to In Memory automatically set all the column to be loaded to the memory 
•If we want to load some of the columns we explicitly need to state which columns are NOT loaded to the memory: 
CREATE TABLE im_col_tab( 
id NUMBER, 
col1 NUMBER, 
col2 NUMBER, 
col3 NUMBER, 
col4 NUMBER 
) INMEMORY 
INMEMORY MEMCOMPRESS FOR QUERY HIGH(col1, col2) 
INMEMORY MEMCOMPRESS FOR CAPACITY HIGH (col3) 
NO INMEMORY (id, col4); 
25 http://brillix.co.il
Table Types That are Not Supported 
•There are tables and column types which are not supported: 
•IOT 
•Clustered tables 
•Objects owned by SYS, SYSTEM or stored in the SYSTEM and SYSAUX tablespaces 
•LONG type columns 
•Out of line LOB 
26 http://brillix.co.il
How Data is Populated in the Memory 
•By default, data is being populated in the in memory cache while first reading the table 
•Objects could be configured to be loaded as the instance starts and prioritized according to the application needs 
•There are 5 level of prioritization: None, Low, Medium, High and Critical. None means no pre-loading, critical means before all others. 
27 http://brillix.co.il
Checking Memory Population 
SQL> r 
1 select segment_name, 
2 inmemory_size, 
3 bytes_not_populated, 
4 populate_status, 
5 inmemory_compression, 
6 bytes / inmemory_sizecomp_ratio 
7* from v$im_segments 
SEGMENT_NAME INMEMORY_SIZE BYTES_NOT_POPULATED POPULATE_ INMEMORY_COMPRESS COMP_RATIO 
-------------------------------------------------------------------------------------------------- 
PEOPLE 853540864 0 COMPLETED FOR QUERY LOW 2.43734644 
28 http://brillix.co.il
How to Control In Memory Compression 
29 http://brillix.co.il
Explain Plan, No In Memory 
SQL> select avg(salary), max(p.id_town_work), count(salary) from people p; 
Elapsed: 00:00:23.56 
Execution Plan 
---------------------------------------------------------- 
Plan hash value: 470504681 
----------------------------------------------------------------------------- 
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | 
----------------------------------------------------------------------------- 
| 0 | SELECT STATEMENT | | 1 | 26 | 68771 (1)| 00:00:23 | 
| 1 | SORT AGGREGATE | | 1 | 26 | | | 
| 2 | TABLE ACCESS FULL| PEOPLE | 160M| 3960M| 68771 (1)| 00:00:23 | 
----------------------------------------------------------------------------- 
30 http://brillix.co.il
Query Statistics –No In Memory 
Statistics 
---------------------------------------------------------- 
6 recursive calls 
0 dbblock gets 
2583630 consistent gets 
2501640 physical reads 
0 redo size 
726 bytes sent via SQL*Net to client 
552 bytes received via SQL*Net from client 
2 SQL*Net roundtrips to/from client 
0 sorts (memory) 
0 sorts (disk) 
1 rows processed 
31 http://brillix.co.il
Explain Plan 
SQL> select avg(salary), max(p.id_town_work), count(salary) from people p; 
Elapsed: 00:00:01.10 
Execution Plan 
---------------------------------------------------------- 
Plan hash value: 470504681 
-------------------------------------------------------------------------------------- 
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | 
-------------------------------------------------------------------------------------- 
| 0 | SELECT STATEMENT | | 1 | 26 | 2733 (6)| 00:00:01 | 
| 1 | SORT AGGREGATE | | 1 | 26 | | | 
| 2 | TABLE ACCESS INMEMORYFULL| PEOPLE | 160M| 3960M| 2733 (6)| 00:00:01 | 
-------------------------------------------------------------------------------------- 
32 http://brillix.co.il
Query Statistics –In Memory 
Statistics 
---------------------------------------------------------- 
0 recursive calls 
0 dbblock gets 
9 consistent gets 
0 physical reads 
0 redo size 
726 bytes sent via SQL*Net to client 
552 bytes received via SQL*Net from client 
2 SQL*Net roundtrips to/from client 
0 sorts (memory) 
0 sorts (disk) 
1 rows processed 
33 http://brillix.co.il
Disabling In Memory Option 
•Disabling/Enabling in memory query at the session/system level at the optimizer level: 
•Disabling object maintenance: 
•Removing In Memory Option (requires restart): 
ALTER SESSION|SYSTEM SET INMEMORY_QUERY=DISABLE|ENABLE; 
ALTER SYSTEM SET INMEMORY_FORCE=OFF|DEFAULT; 
ALTER SYSTEM RESET INMEMORY_SIZE SCOPE=SPFILE ; 
SHUTDOWN IMMEDIATE ; 
STARTUP ; 
34 http://brillix.co.il
Demo 
35 http://brillix.co.il
What Did We Not Talk About? 
•Working with DBIM with RAC, Engineered systems and in multitenant environments 
•What happens when there is not enough memory? 
•In memory storage indexes and In memory joins 
•Read consistency, IMCU staleness and trickle repopulate 
36 http://brillix.co.il
Conclusion 
•The DBIM is a very interesting feature which can make analytic queries run much faster 
•Working with in memory option requires understanding of the database model and relevant queries –memory is not infinite. 
•No significant bugs found yet but it’s very early 
•Some behaviors may (and should) change in the future 
37 http://brillix.co.il
Thank YouZohar ElkayamBrillixZohar@Brillix.co.ilwww.realdbamagic.com 
38 http://brillix.co.il

More Related Content

What's hot

PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformanceZohar Elkayam
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
The art of querying – newest and advanced SQL techniques
The art of querying – newest and advanced SQL techniquesThe art of querying – newest and advanced SQL techniques
The art of querying – newest and advanced SQL techniquesZohar Elkayam
 
Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Zohar Elkayam
 
Oracle Database Advanced Querying (2016)
Oracle Database Advanced Querying (2016)Oracle Database Advanced Querying (2016)
Oracle Database Advanced Querying (2016)Zohar Elkayam
 
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop EcosystemThings Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop EcosystemZohar Elkayam
 
Advanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceAdvanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceZohar Elkayam
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsZohar Elkayam
 
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic FunctionsOOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
 
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle DatabaseBest Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle DatabaseEdgar Alejandro Villegas
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinStåle Deraas
 
Hive Data Modeling and Query Optimization
Hive Data Modeling and Query OptimizationHive Data Modeling and Query Optimization
Hive Data Modeling and Query OptimizationEyad Garelnabi
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevFuenteovejuna
 
Executing Queries on a Sharded Database
Executing Queries on a Sharded DatabaseExecuting Queries on a Sharded Database
Executing Queries on a Sharded DatabaseNeha Narula
 
Ordina Oracle Open World
Ordina Oracle Open WorldOrdina Oracle Open World
Ordina Oracle Open WorldMarco Gralike
 
Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryJustin Swanhart
 
An introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xAn introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xMarco Gralike
 
MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesIsaac Mosquera
 

What's hot (20)

PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme Performance
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
The art of querying – newest and advanced SQL techniques
The art of querying – newest and advanced SQL techniquesThe art of querying – newest and advanced SQL techniques
The art of querying – newest and advanced SQL techniques
 
Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?
 
Oracle Database Advanced Querying (2016)
Oracle Database Advanced Querying (2016)Oracle Database Advanced Querying (2016)
Oracle Database Advanced Querying (2016)
 
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop EcosystemThings Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
 
Advanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceAdvanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better Performance
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOps
 
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic FunctionsOOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
 
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle DatabaseBest Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
 
Hive Data Modeling and Query Optimization
Hive Data Modeling and Query OptimizationHive Data Modeling and Query Optimization
Hive Data Modeling and Query Optimization
 
Intro to column stores
Intro to column storesIntro to column stores
Intro to column stores
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
 
Executing Queries on a Sharded Database
Executing Queries on a Sharded DatabaseExecuting Queries on a Sharded Database
Executing Queries on a Sharded Database
 
Ordina Oracle Open World
Ordina Oracle Open WorldOrdina Oracle Open World
Ordina Oracle Open World
 
Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard query
 
An introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xAn introduction into Oracle VM V3.x
An introduction into Oracle VM V3.x
 
MySQL Performance Tips & Best Practices
MySQL Performance Tips & Best PracticesMySQL Performance Tips & Best Practices
MySQL Performance Tips & Best Practices
 

Similar to Oracle Database In-Memory Option for ILOUG

Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceZohar Elkayam
 
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerGeek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerIDERA Software
 
12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta 12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta pasalapudi123
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
 
Oracle Database InMemory
Oracle Database InMemoryOracle Database InMemory
Oracle Database InMemoryJorge Barba
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesTanel Poder
 
Sloupcové uložení dat a použití in-memory technologií u řešení Exadata
Sloupcové uložení dat a použití in-memory technologií u řešení ExadataSloupcové uložení dat a použití in-memory technologií u řešení Exadata
Sloupcové uložení dat a použití in-memory technologií u řešení ExadataMarketingArrowECS_CZ
 
Oracle in-Memory Column Store for BI
Oracle in-Memory Column Store for BIOracle in-Memory Column Store for BI
Oracle in-Memory Column Store for BIFranck Pachot
 
MySQL: Know more about open Source Database
MySQL: Know more about open Source DatabaseMySQL: Know more about open Source Database
MySQL: Know more about open Source DatabaseMahesh Salaria
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTPAmber Keyse
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionTanel Poder
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsMaaz Anjum
 
Real World Performance - Data Warehouses
Real World Performance - Data WarehousesReal World Performance - Data Warehouses
Real World Performance - Data WarehousesConnor McDonald
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeChris Adkin
 

Similar to Oracle Database In-Memory Option for ILOUG (20)

Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better Performance
 
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerGeek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
 
12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta 12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
 
Oracle Database InMemory
Oracle Database InMemoryOracle Database InMemory
Oracle Database InMemory
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known Features
 
Sloupcové uložení dat a použití in-memory technologií u řešení Exadata
Sloupcové uložení dat a použití in-memory technologií u řešení ExadataSloupcové uložení dat a použití in-memory technologií u řešení Exadata
Sloupcové uložení dat a použití in-memory technologií u řešení Exadata
 
Oracle in-Memory Column Store for BI
Oracle in-Memory Column Store for BIOracle in-Memory Column Store for BI
Oracle in-Memory Column Store for BI
 
MySQL: Know more about open Source Database
MySQL: Know more about open Source DatabaseMySQL: Know more about open Source Database
MySQL: Know more about open Source Database
 
Percona FT / TokuDB
Percona FT / TokuDBPercona FT / TokuDB
Percona FT / TokuDB
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTP
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM Metrics
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
Real World Performance - Data Warehouses
Real World Performance - Data WarehousesReal World Performance - Data Warehouses
Real World Performance - Data Warehouses
 
Database storage engines
Database storage enginesDatabase storage engines
Database storage engines
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
 

More from Zohar Elkayam

Oracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic FunctionsOracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic FunctionsZohar Elkayam
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527Zohar Elkayam
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)Zohar Elkayam
 
Introduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerIntroduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerZohar Elkayam
 
Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016Zohar Elkayam
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
 
The Hadoop Ecosystem for Developers
The Hadoop Ecosystem for DevelopersThe Hadoop Ecosystem for Developers
The Hadoop Ecosystem for DevelopersZohar Elkayam
 
Oracle Data Guard A to Z
Oracle Data Guard A to ZOracle Data Guard A to Z
Oracle Data Guard A to ZZohar Elkayam
 
Oracle Data Guard Broker Webinar
Oracle Data Guard Broker WebinarOracle Data Guard Broker Webinar
Oracle Data Guard Broker WebinarZohar Elkayam
 

More from Zohar Elkayam (11)

Oracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic FunctionsOracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic Functions
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
 
Introduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerIntroduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard Broker
 
Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic Functions
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic Functions
 
The Hadoop Ecosystem for Developers
The Hadoop Ecosystem for DevelopersThe Hadoop Ecosystem for Developers
The Hadoop Ecosystem for Developers
 
Intro to Big Data
Intro to Big DataIntro to Big Data
Intro to Big Data
 
Oracle Data Guard A to Z
Oracle Data Guard A to ZOracle Data Guard A to Z
Oracle Data Guard A to Z
 
Oracle Data Guard Broker Webinar
Oracle Data Guard Broker WebinarOracle Data Guard Broker Webinar
Oracle Data Guard Broker Webinar
 

Recently uploaded

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Oracle Database In-Memory Option for ILOUG

  • 1. Zohar Elkayam CTO, Brillix Zohar@Brillix.co.il Twitter: @realmgic Oracle Database In Memory Option
  • 2. Agenda •About in memory stores •About column stores •Introduction to Database In Memory –Oracle In Memory Option •How to use DBIM •Short demo 2 http://brillix.co.il
  • 3. Who am I? •Zohar Elkayam, CTO at Brillix •Oracle ACE Associate •DBA, team leader, instructor and senior consultant for over 16 years •Editor (and manager) of ilDBA –Israel Database Community •Blogger –www.realdbamagic.com 3 http://brillix.co.il
  • 4. What are In Memory Databases and Column Stores? 4 http://brillix.co.il
  • 5. What is a In Memory Database? In memory databases are management systems that keeps the data in a non-persistent storage (RAM) for faster access Examples: •MemcacheDB •Oracle TimesTen 5 http://brillix.co.il
  • 6. What is a Column Store Database? •Column Store databases are management systems that uses data managed in a columnar structure format for better analysis of single column data (i.e. aggregation). Data is saved and handled as columns instead of rows. Examples: •Vertica •GreenPlum •HBase 6 http://brillix.co.il
  • 7. How Records are Organized? •This is a logical table in RDBMS systems •Its physical organization is just like the logical one: column by column, row by row Row 1 Row 2 Row 3 Row 4 Col 1 Col 2 Col 3 Col 4 7 http://brillix.co.il
  • 8. Query Data •When we query data, records are read at the order they are organized in the physical structure •Even when we query a single column, we still need to read the entire table and extract the column Row 1 Row 2 Row 3 Row 4 Col 1 Col 2 Col 3 Col 4 Select Col2 From MyTable Select * From MyTable 8 http://brillix.co.il
  • 9. How Does Column Store Save Data Organization in row store Organization in column store 10 http://brillix.co.il
  • 10. Row Format vs. Column Format 11 http://brillix.co.il
  • 11. Column Store Limitations •Most Column stores avoid or limit online transactions •Most Column stores avoid data changes (updates) and implement it as insert/delete •Columnar organization is very good for large quantities of data but is not very efficient when storing smaller amounts of data •Column store SQL might be somewhat different from ANSI SQL 12 http://brillix.co.il
  • 12. In Memory Option 13 http://brillix.co.il
  • 13. In Memory Option Breakthrough •In memory option introduces a dual format database •Tables can be accessed as row format and column format at the same time –the Optimizer is aware to the new format so: •OLTP continue using the old row format •Analytic queries start using the column format 14 http://brillix.co.il
  • 14. In-Memory Option •Column data is pure in memory format and therefor is non- persistent and require no logging, archiving or backup •Data changes are simultaneously changed in both formats so data is consistent •Since the data is column based, it has better compression ratio and more data can be stored in memory •There are no changes to the application required –just turn on and start using 15 http://brillix.co.il
  • 15. Order of Magnitude Faster •Customer report analytic queries run 10 to 1000 times faster •Since less analytic Indexes are needed, OLTP run faster too •Data processing is done using SIMD Vector Instruction so billions of records can be handled by a single CPU 16 http://brillix.co.il
  • 16. In Memory Option –Good To Know •Oracle 12.1.0.2 feature –additional license required •It is NotIn Memory Database –it’s an accelerator to our current database •It is NotColumn Store Database –it allows keeping some of our data in column store which is non-persistent •It has nothing to do with Times-Ten or Oracle Coherence 17 http://brillix.co.il
  • 17. More Good to Know •In memory option does not work on an Active Data Guard standby database but roadmap does contains this feature in the future. It does work on logical standby database •Optimization of the execution plan in regards of using the DBIM might (and probably will) change in future versions •Known bugs: no functionality bugs known at this time but there is a known bug around the license auditing of this feature 18 http://brillix.co.il
  • 18. How To Use DBIM? 19 http://brillix.co.il
  • 19. How to Configure •Configure memory capacity •The amount of memory allocated must be larger than the amount of data loaded (after compression). We should also allow some spare memory for maintenance. •Configure tablespaces, tables, partitions, sub-partitions or columns to be in memory: •Optional: drop unused OLTP indexes –those who used for analytics. inmemory_size= xxx GB alter table | partition ...inmemory; 20 http://brillix.co.il
  • 20. Startup SQL> startup ORACLE instance started. Total System Global Area 5368709120 bytes Fixed Size 3056960 bytes Variable Size 620759744 bytes Database Buffers 1509949440 bytes Redo Buffers 13717504 bytes In-Memory Area 3221225472 bytes Database mounted. Database opened. 21 http://brillix.co.il
  • 21. Parameters Related to In Memory Option SQL> show parameter inmememory NAME TYPE VALUE ----------------------------------------------------------------------------- inmemory_clause_defaultstring inmemory_forcestring DEFAULT inmemory_max_populate_serversinteger 2 inmemory_querystring ENABLE inmemory_sizebig integer 3G inmemory_trickle_repopulate_servers_ integer 1 percent optimizer_inmemory_awarebooleanTRUE 22 http://brillix.co.il
  • 22. Where Does the In Memory Resides? •In Memory is part of the SGA –adding this buffer will require changing the SGA size Shared pool Buffercache Redo logbuffer Streams pool Large pool Java pool System Global Area (SGA) KEEP buffer pool RECYCLE buffer pool nKbuffer cache Column Store In Memory Buffer 23 http://brillix.co.il
  • 23. Checking Table Settings SQL> r 1 SELECT table_name, 2 inmemory, 3 inmemory_priority, 4 inmemory_distribute, 5 inmemory_compression, 6 inmemory_duplicate 7 FROM user_tables 8* ORDER BY table_name TABLE_NAME INMEMORY INMEMORYINMEMORY_DISTRI INMEMORY_COMPRESS INMEMORY_DUPL --------------------------------------------------------------------------------- PEOPLE ENABLED HIGH AUTO FOR QUERY LOW NO DUPLICATE PEOPLE2 DISABLED TOWNS DISABLED 24 http://brillix.co.il
  • 24. Managing In Memory at the Column Level •Setting a table to In Memory automatically set all the column to be loaded to the memory •If we want to load some of the columns we explicitly need to state which columns are NOT loaded to the memory: CREATE TABLE im_col_tab( id NUMBER, col1 NUMBER, col2 NUMBER, col3 NUMBER, col4 NUMBER ) INMEMORY INMEMORY MEMCOMPRESS FOR QUERY HIGH(col1, col2) INMEMORY MEMCOMPRESS FOR CAPACITY HIGH (col3) NO INMEMORY (id, col4); 25 http://brillix.co.il
  • 25. Table Types That are Not Supported •There are tables and column types which are not supported: •IOT •Clustered tables •Objects owned by SYS, SYSTEM or stored in the SYSTEM and SYSAUX tablespaces •LONG type columns •Out of line LOB 26 http://brillix.co.il
  • 26. How Data is Populated in the Memory •By default, data is being populated in the in memory cache while first reading the table •Objects could be configured to be loaded as the instance starts and prioritized according to the application needs •There are 5 level of prioritization: None, Low, Medium, High and Critical. None means no pre-loading, critical means before all others. 27 http://brillix.co.il
  • 27. Checking Memory Population SQL> r 1 select segment_name, 2 inmemory_size, 3 bytes_not_populated, 4 populate_status, 5 inmemory_compression, 6 bytes / inmemory_sizecomp_ratio 7* from v$im_segments SEGMENT_NAME INMEMORY_SIZE BYTES_NOT_POPULATED POPULATE_ INMEMORY_COMPRESS COMP_RATIO -------------------------------------------------------------------------------------------------- PEOPLE 853540864 0 COMPLETED FOR QUERY LOW 2.43734644 28 http://brillix.co.il
  • 28. How to Control In Memory Compression 29 http://brillix.co.il
  • 29. Explain Plan, No In Memory SQL> select avg(salary), max(p.id_town_work), count(salary) from people p; Elapsed: 00:00:23.56 Execution Plan ---------------------------------------------------------- Plan hash value: 470504681 ----------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ----------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 26 | 68771 (1)| 00:00:23 | | 1 | SORT AGGREGATE | | 1 | 26 | | | | 2 | TABLE ACCESS FULL| PEOPLE | 160M| 3960M| 68771 (1)| 00:00:23 | ----------------------------------------------------------------------------- 30 http://brillix.co.il
  • 30. Query Statistics –No In Memory Statistics ---------------------------------------------------------- 6 recursive calls 0 dbblock gets 2583630 consistent gets 2501640 physical reads 0 redo size 726 bytes sent via SQL*Net to client 552 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed 31 http://brillix.co.il
  • 31. Explain Plan SQL> select avg(salary), max(p.id_town_work), count(salary) from people p; Elapsed: 00:00:01.10 Execution Plan ---------------------------------------------------------- Plan hash value: 470504681 -------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 26 | 2733 (6)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | 26 | | | | 2 | TABLE ACCESS INMEMORYFULL| PEOPLE | 160M| 3960M| 2733 (6)| 00:00:01 | -------------------------------------------------------------------------------------- 32 http://brillix.co.il
  • 32. Query Statistics –In Memory Statistics ---------------------------------------------------------- 0 recursive calls 0 dbblock gets 9 consistent gets 0 physical reads 0 redo size 726 bytes sent via SQL*Net to client 552 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed 33 http://brillix.co.il
  • 33. Disabling In Memory Option •Disabling/Enabling in memory query at the session/system level at the optimizer level: •Disabling object maintenance: •Removing In Memory Option (requires restart): ALTER SESSION|SYSTEM SET INMEMORY_QUERY=DISABLE|ENABLE; ALTER SYSTEM SET INMEMORY_FORCE=OFF|DEFAULT; ALTER SYSTEM RESET INMEMORY_SIZE SCOPE=SPFILE ; SHUTDOWN IMMEDIATE ; STARTUP ; 34 http://brillix.co.il
  • 35. What Did We Not Talk About? •Working with DBIM with RAC, Engineered systems and in multitenant environments •What happens when there is not enough memory? •In memory storage indexes and In memory joins •Read consistency, IMCU staleness and trickle repopulate 36 http://brillix.co.il
  • 36. Conclusion •The DBIM is a very interesting feature which can make analytic queries run much faster •Working with in memory option requires understanding of the database model and relevant queries –memory is not infinite. •No significant bugs found yet but it’s very early •Some behaviors may (and should) change in the future 37 http://brillix.co.il