SlideShare a Scribd company logo
The top 12 new features of Oracle 12c!
David Yahalom,
CTO, NAYA Technologies

www.naya-tech.com
Email:
davidy@naya-tech.co.il
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved column defaults
SQL> create sequence s;
Sequence created.
SQL> create table my_table
2 ( x int
3 default s.nextval
4 primary key,
5 y varchar2(30)
6 );
Table created.
• > Sequences supported for columns
without a trigger!
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved column defaults
• > We can now use an IDENTITY type!
•
• > Generates a sequence and associate that
sequence with the table.
create table my_Table
(x int generated as identity
primary key,
y varchar2(30));
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved column defaults
create table t
(x int generated by default
as identity
(start with 42
increment by 1000 )
primary key,
y varchar2(30))
• > Complex identity values supported
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Increased size limits
> VARCHARS can go up to 32K!
Set MAX_STRING_SIZE init.ora parameter to
EXTENDED.
Run @?/rdbms/admin/utl32k.sql
create table t ( x varchar(32767) );
>> Actually stored as LOB
>> In-row <= 4K, out of row > 4K…
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Increased size limits
> But now you can use RPAD/LPAD/TRIM !
SQL> insert into my_tab values ( rpad('*',
32000,'*') );
1 row created.
SQL> select length(x) from my_tab;
LENGTH(X)
——————————————
32000
(previously string built-in functions would have been
able to return only 4,000 bytes)
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved top-N queries
> New Row limiting clause for result set
pagination.
> Support for the ANSI-standard FETCH FIRST/
NEXT and OFFSET
create table t
as select * from all_objects;
create index t_idx on t(owner,object_name);
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved top-N queries
> Retrieve the first five rows after sorting by
OWNER and OBJECT_NAME
select owner, object_name, object_id
from t
order by owner, object_name
FETCH FIRST 5 ROWS ONLY;
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved top-N queries
> The optimizer is rewriting the query to use
analytics!
…
——————————————————————————————————————————————————————————————————————————————
| Id |Operation | Name|Rows |Bytes |Cost (%CPU)|Time |
——————————————————————————————————————————————————————————————————————————————
| 0|SELECT STATEMENT | | 5 | 1450 | 7 (0)|00:00:01|
|* 1| VIEW | | 5 | 1450 | 7 (0)|00:00:01|
|* 2| WINDOW NOSORT STOPKEY | | 5 | 180 | 7 (0)|00:00:01|
| 3| TABLE ACCESS BY INDEX ROWID|T |87310 | 3069K| 7 (0)|00:00:01|
| 4| INDEX FULL SCAN |T_IDX| 5 | | 3 (0)|00:00:01|
——————————————————————————————————————————————————————————————————————————————
Predicate Information (identified by operation id):
—————————————————————————————————————————————————————————————————
1 - filter("from$_subquery$_003"."rowlimit_$$_rownumber"<=5)
2 - filter(ROW_NUMBER() OVER ( ORDER BY "OWNER","OBJECT_NAME")<=5)
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Improved top-N queries
> To paginate through a result set:

(Get N rows at a time from a specific page in the result set
—add the OFFSET clause).
select owner, object_name, object_id
from t
order by owner, object_name
OFFSET 5 ROWS FETCH NEXT 5 ROWS ONLY;
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Temporary UNDO
> Previously: 



Temporary tablespace DML
Generates UNDO in the UNDO TBS

(for read consistency)
UNDO TBS changes required REDO for crash
recovery
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Temporary UNDO
Temp TBS
Redo logs
Undo TBS
Bulk Load
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Temporary UNDO
Temp TBS & Temporary Undo
Redo logs
Undo TBS
Bulk Load
Permanent tables
Operations on temporary tables will
no longer generate redo.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Temporary UNDO
> Can be used with Active DataGuard!
Read-only replicated tables
Read / Write temporary table
(intermediate query results)
Source Database
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Temporary UNDO
alter session
set temp_undo_enabled = true;
update my_table set object_name =
lower(object_name);
87310 rows updated.
Statistics
———————————————————————————————
…
0 redo size
…
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
New partitioning features
> Move a partition ONLINE!
(non-blocking DDL, allow DML)
alter table test_tbl move partition p1 ONLINE;
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Transaction Guard
> For database developers.
> API that returns the outcome of the
last transaction.
> Provide protection for sensitive
transactions that are allowed to only
happen once.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Transaction Guard
> Without:
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Transaction Guard
CallableStatement c = conn2.prepareCall(
"declare b1 boolean; b2 boolean; begin"
+"DBMS_APP_CONT.GET_LTXID_OUTCOME(?,b1,"
+"b2); ? := case when B1 then "
+"'COMMITTED' else 'UNCOMMITTED' end; "
+"end;");
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Transaction Guard
> With:
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Adaptive Execution Plans
> Before Oracle 12c, plans were fixed for the
first execution.
> Unexpected high row counts may make first plan
suboptimal.
> With 12, the Optimizer can now generate
plan + subplans.

> Optimizer picks final plan based on cardinality
during first execution.
> “Changes its mind” in realtime!

www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Adaptive Execution Plans
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Adaptive Execution Plans
--------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 23 | 4 (0)| 00:00:01 |
| 1 | HASH UNIQUE | | 1 | 23 | 4 (0)| 00:00:01 |
|- * 2 | HASH JOIN SEMI | | 1 | 23 | 4 (0)| 00:00:01 |
| 3 | NESTED LOOPS SEMI | | 1 | 23 | 4 (0)| 00:00:01 |
|- 4 | STATISTICS COLLECTOR | | | | | |
| * 5 | TABLE ACCESS FULL | DEPARTMENTS | 1 | 16 | 3 (0)| 00:00:01 |
| * 6 | TABLE ACCESS BY INDEX ROWID BATCHED| EMPLOYEES | 1 | 7 | 1 (0)| 00:00:01 |
| * 7 | INDEX RANGE SCAN | EMP_DEPARTMENT_IX | 10 | | 0 (0)| 00:00:01 |
|- * 8 | TABLE ACCESS FULL | EMPLOYEES | 1 | 7 | 1 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------------------------
Note
-----
- this is an adaptive plan (rows marked '-' are inactive)
> STATISTICS COLLECTOR buffers the rows and able
to switch to HASH JOIN when cardinality becomes
higher than what was estimated.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Adaptive Execution Plans
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Adaptive Execution Plans
Rejected!
Accepted!
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Adaptive Execution Plans
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Enhanced Statistics
> New histograms: Top, Hybrid.

> New Dynamic Sampling: 

Dynamic Sampled statistics (now
Dynamic Statistics) can be reused.


If defined at 2 (which is the default) dynamics statistics will be
gathered if at leat one table in the query has no statistics.
If defined to 11 the database will use dynamic statistics
 automatically when statistics are missing, statistics are stale,
statistics are insufficient.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Enhanced Statistics
> Automatically compute statistics
during loads (CATS).
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Data Optimisation and ILM
> Oracle 12c creates “Heat Maps” 

- tracks and marks data at the row and block
level as it goes through life cycle changes.



> Automatic Data  Optimization  works with the
Heat Map feature and allows us to create
policies.
> Automatic Data Optimization allows you to
create policies for data compression and data
movement, to implement storage tiers.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Data Optimisation and ILM
> Data can be:
Hot: the object is actively in Read/Write.
Warm: the object which is accessed in
reads only
Cold: the object is not participating in
any kind of activity.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Data Optimisation and ILM
SQL> alter session set heat_map=on;
SQL> select * from scott.emp;
EMPNO ENAME JOB MGR HIREDATE SAL
COMM DEPTNO
---------- ---------- --------- ---------- --------- ----------
---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800
20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600
…
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Data Optimisation and ILM
select object_name, track_time "Tracking Time",
segment_write "Segment write",
full_scan "Full Scan",
lookup_scan "Lookup Scan"
from DBA_HEAT_MAP_SEG_HISTOGRAM
where object_name='MYOBJECTS'
and owner = 'SCOTT';
OBJECT_NAME
-------------------------------------------------------------
-------------------
Tracking Time Segment write Full Scan Lookup Scan
------------------ -------------- ------------ ------------
MYOBJECTS
09-sep-13 02:40:14 NO YES NO
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Data Optimisation and ILM
ALTER TABLE scott.myobjects ILM ADD POLICY ROW
STORE
COMPRESS ADVANCED SEGMENT AFTER 30 DAYS OF NO
MODIFICATION;
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Row Pattern Matching
> An extension to the SELECT
statement using MATCH_RECOGNIZE
that allows us to identify patterns
across sequences of rows.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Row Pattern Matching
PATTERN (STRT DOWN+ UP+)
DEFINE
DOWN AS
DOWN.price < PREV(DOWN.price),
UP AS UP.price > PREV(UP.price) 
XYZ 13-MAR-15 35 ***********************************
XYZ 14-MAR-15 34 **********************************
XYZ 15-MAR-15 33 *********************************
XYZ 16-MAR-15 34 **********************************
XYZ 17-MAR-15 35 ***********************************
XYZ 18-MAR-15 36 ************************************
XYZ 19-MAR-15 37 *************************************
XYZ 20-MAR-15 36 ************************************
XYZ 21-MAR-15 35 ***********************************
XYZ 22-MAR-15 34 **********************************
XYZ 23-MAR-15 35 ***********************************
XYZ 24-MAR-15 36 ************************************
XYZ 25-MAR-15 37 *************************************
Any record, followed by one or more records in which the price of the stock goes
down, followed by one or more records in which the stock price increases.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
PL/SQL enhancements. 
> Define PL/SQL Subprograms in a
SQL Statement.
> Why would a developer want to copy
logic from a PL/SQL function into a
SQL statement?
To improve performance.
> No context switch to the PL/SQL
engine.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
A PDB is a self-contained, fully
functional Oracle Database, and
includes its own system, sysaux
and user tablespaces.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
> CDB: Similar to a conventional Oracle
database.
> Contains most of the working parts you will be already
familiar with (controlfiles, datafiles, undo, tempfiles, redo
logs etc.).
> Contains the data dictionary for those objects that are
owned by the root container and those that are visible to
all PDBs.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
> PDB: Contains information specific to itself.
> Made up of datafiles and tempfiles to handle it's own
objects: includes it's own data dictionary, containing
information about only those objects that are specific to
the PDB.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
> Allows databases to be moved easily
> Allows quick patching and upgrading to future
versions.
A PDB can be unplugged from a 12.1 CBD and plugged
into a 12.2 CDB, effectively upgrading it in seconds.
www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945
Pluggable Databases
12.1.0.2
Thank You
Please visit us at www.naya-tech.com

More Related Content

What's hot

What's hot (20)

Oracle 12c New Features for Developers
Oracle 12c New Features for DevelopersOracle 12c New Features for Developers
Oracle 12c New Features for Developers
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
2011 Collaborate IOUG Presentation
2011 Collaborate IOUG Presentation2011 Collaborate IOUG Presentation
2011 Collaborate IOUG Presentation
 
2009 Collaborate IOUG Presentation
2009 Collaborate IOUG Presentation2009 Collaborate IOUG Presentation
2009 Collaborate IOUG Presentation
 
Oracle-L11 using Oracle flashback technology-Mazenet solution
Oracle-L11 using  Oracle flashback technology-Mazenet solutionOracle-L11 using  Oracle flashback technology-Mazenet solution
Oracle-L11 using Oracle flashback technology-Mazenet solution
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata  Expr...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
 
Oracle Database 12.1.0.2 New Performance Features
Oracle Database 12.1.0.2 New Performance FeaturesOracle Database 12.1.0.2 New Performance Features
Oracle Database 12.1.0.2 New Performance Features
 
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
RMAN - New Features in Oracle 12c - IOUG Collaborate 2017
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
Oracle Database In-Memory and the Query Optimizer
Oracle Database In-Memory and the Query OptimizerOracle Database In-Memory and the Query Optimizer
Oracle Database In-Memory and the Query Optimizer
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
 
Oracle flashback
Oracle flashbackOracle flashback
Oracle flashback
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance Strategy
 
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSOracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTS
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
What’s new in oracle 12c recovery manager (rman)
What’s new in oracle 12c recovery manager (rman)What’s new in oracle 12c recovery manager (rman)
What’s new in oracle 12c recovery manager (rman)
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)
 
Oracle 12c Architecture
Oracle 12c ArchitectureOracle 12c Architecture
Oracle 12c Architecture
 

Viewers also liked

Oracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12cOracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12c
Andrey Akulov
 
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your CloudExploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your Cloud
dyahalom
 

Viewers also liked (20)

Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
 
Oracle Database 11g vs 12c
Oracle Database 11g vs 12cOracle Database 11g vs 12c
Oracle Database 11g vs 12c
 
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12cCosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
 
Oracle 12c New Features
Oracle 12c New FeaturesOracle 12c New Features
Oracle 12c New Features
 
Oracle 12c ilm_customer_experience
Oracle 12c ilm_customer_experienceOracle 12c ilm_customer_experience
Oracle 12c ilm_customer_experience
 
Presentation 12c grid_upgrade
Presentation 12c grid_upgradePresentation 12c grid_upgrade
Presentation 12c grid_upgrade
 
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperOracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL Developer
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
 
Emrah METE - Oracle Cloud Day 2015 12c SQL New Features
Emrah METE - Oracle Cloud Day 2015 12c SQL New Features Emrah METE - Oracle Cloud Day 2015 12c SQL New Features
Emrah METE - Oracle Cloud Day 2015 12c SQL New Features
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
Oracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12cOracle Database 12c: Новые возможности Oracle 12c
Oracle Database 12c: Новые возможности Oracle 12c
 
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your CloudExploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your Cloud
 
Cognitive Radio Networks for Emergency Communications June 2012
Cognitive Radio Networks for Emergency Communications June 2012Cognitive Radio Networks for Emergency Communications June 2012
Cognitive Radio Networks for Emergency Communications June 2012
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
 
Cognitive Radio for Public Safety Applications September 2012
Cognitive Radio for Public Safety Applications September 2012Cognitive Radio for Public Safety Applications September 2012
Cognitive Radio for Public Safety Applications September 2012
 

Similar to The Top 12 Features new to Oracle 12c

Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Guatemala User Group
 
From Startup to Mature Company: PostgreSQL Tips and techniques
From Startup to Mature Company:  PostgreSQL Tips and techniquesFrom Startup to Mature Company:  PostgreSQL Tips and techniques
From Startup to Mature Company: PostgreSQL Tips and techniques
John Ashmead
 
Metadata Matters
Metadata MattersMetadata Matters
Metadata Matters
afa reg
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 

Similar to The Top 12 Features new to Oracle 12c (20)

Oracle12 - The Top12 Features by NAYA Technologies
Oracle12 - The Top12 Features by NAYA TechnologiesOracle12 - The Top12 Features by NAYA Technologies
Oracle12 - The Top12 Features by NAYA Technologies
 
sqltuningcardinality1(1).ppt
sqltuningcardinality1(1).pptsqltuningcardinality1(1).ppt
sqltuningcardinality1(1).ppt
 
Informix Warehouse Accelerator (IWA) features in version 12.1
Informix Warehouse Accelerator (IWA) features in version 12.1Informix Warehouse Accelerator (IWA) features in version 12.1
Informix Warehouse Accelerator (IWA) features in version 12.1
 
Advance MySQL Training by Pratyush Majumdar
Advance MySQL Training by Pratyush MajumdarAdvance MySQL Training by Pratyush Majumdar
Advance MySQL Training by Pratyush Majumdar
 
Managing Statistics for Optimal Query Performance
Managing Statistics for Optimal Query PerformanceManaging Statistics for Optimal Query Performance
Managing Statistics for Optimal Query Performance
 
A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
12c SQL Plan Directives
12c SQL Plan Directives12c SQL Plan Directives
12c SQL Plan Directives
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query Tuning
 
PostgreSQL query planner's internals
PostgreSQL query planner's internalsPostgreSQL query planner's internals
PostgreSQL query planner's internals
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor format
 
How Database Convergence Impacts the Coming Decades of Data Management
How Database Convergence Impacts the Coming Decades of Data ManagementHow Database Convergence Impacts the Coming Decades of Data Management
How Database Convergence Impacts the Coming Decades of Data Management
 
From Startup to Mature Company: PostgreSQL Tips and techniques
From Startup to Mature Company:  PostgreSQL Tips and techniquesFrom Startup to Mature Company:  PostgreSQL Tips and techniques
From Startup to Mature Company: PostgreSQL Tips and techniques
 
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19cSQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19c
 
query-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdfquery-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdf
 
Metadata Matters
Metadata MattersMetadata Matters
Metadata Matters
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
 

Recently uploaded

一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 

Recently uploaded (20)

一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 

The Top 12 Features new to Oracle 12c

  • 1. The top 12 new features of Oracle 12c! David Yahalom, CTO, NAYA Technologies
 www.naya-tech.com Email: davidy@naya-tech.co.il
  • 2. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved column defaults SQL> create sequence s; Sequence created. SQL> create table my_table 2 ( x int 3 default s.nextval 4 primary key, 5 y varchar2(30) 6 ); Table created. • > Sequences supported for columns without a trigger!
  • 3. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved column defaults • > We can now use an IDENTITY type! • • > Generates a sequence and associate that sequence with the table. create table my_Table (x int generated as identity primary key, y varchar2(30));
  • 4. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved column defaults create table t (x int generated by default as identity (start with 42 increment by 1000 ) primary key, y varchar2(30)) • > Complex identity values supported
  • 5. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Increased size limits > VARCHARS can go up to 32K! Set MAX_STRING_SIZE init.ora parameter to EXTENDED. Run @?/rdbms/admin/utl32k.sql create table t ( x varchar(32767) ); >> Actually stored as LOB >> In-row <= 4K, out of row > 4K…
  • 6. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Increased size limits > But now you can use RPAD/LPAD/TRIM ! SQL> insert into my_tab values ( rpad('*', 32000,'*') ); 1 row created. SQL> select length(x) from my_tab; LENGTH(X) —————————————— 32000 (previously string built-in functions would have been able to return only 4,000 bytes)
  • 7. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved top-N queries > New Row limiting clause for result set pagination. > Support for the ANSI-standard FETCH FIRST/ NEXT and OFFSET create table t as select * from all_objects; create index t_idx on t(owner,object_name);
  • 8. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved top-N queries > Retrieve the first five rows after sorting by OWNER and OBJECT_NAME select owner, object_name, object_id from t order by owner, object_name FETCH FIRST 5 ROWS ONLY;
  • 9. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved top-N queries > The optimizer is rewriting the query to use analytics! … —————————————————————————————————————————————————————————————————————————————— | Id |Operation | Name|Rows |Bytes |Cost (%CPU)|Time | —————————————————————————————————————————————————————————————————————————————— | 0|SELECT STATEMENT | | 5 | 1450 | 7 (0)|00:00:01| |* 1| VIEW | | 5 | 1450 | 7 (0)|00:00:01| |* 2| WINDOW NOSORT STOPKEY | | 5 | 180 | 7 (0)|00:00:01| | 3| TABLE ACCESS BY INDEX ROWID|T |87310 | 3069K| 7 (0)|00:00:01| | 4| INDEX FULL SCAN |T_IDX| 5 | | 3 (0)|00:00:01| —————————————————————————————————————————————————————————————————————————————— Predicate Information (identified by operation id): ————————————————————————————————————————————————————————————————— 1 - filter("from$_subquery$_003"."rowlimit_$$_rownumber"<=5) 2 - filter(ROW_NUMBER() OVER ( ORDER BY "OWNER","OBJECT_NAME")<=5)
  • 10. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Improved top-N queries > To paginate through a result set:
 (Get N rows at a time from a specific page in the result set —add the OFFSET clause). select owner, object_name, object_id from t order by owner, object_name OFFSET 5 ROWS FETCH NEXT 5 ROWS ONLY;
  • 11. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Temporary UNDO > Previously: 
 
 Temporary tablespace DML Generates UNDO in the UNDO TBS
 (for read consistency) UNDO TBS changes required REDO for crash recovery
  • 12. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Temporary UNDO Temp TBS Redo logs Undo TBS Bulk Load
  • 13. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Temporary UNDO Temp TBS & Temporary Undo Redo logs Undo TBS Bulk Load Permanent tables Operations on temporary tables will no longer generate redo.
  • 14. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Temporary UNDO > Can be used with Active DataGuard! Read-only replicated tables Read / Write temporary table (intermediate query results) Source Database
  • 15. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Temporary UNDO alter session set temp_undo_enabled = true; update my_table set object_name = lower(object_name); 87310 rows updated. Statistics ——————————————————————————————— … 0 redo size …
  • 16. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 New partitioning features > Move a partition ONLINE! (non-blocking DDL, allow DML) alter table test_tbl move partition p1 ONLINE;
  • 17. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Transaction Guard > For database developers. > API that returns the outcome of the last transaction. > Provide protection for sensitive transactions that are allowed to only happen once.
  • 18. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Transaction Guard > Without:
  • 19. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Transaction Guard CallableStatement c = conn2.prepareCall( "declare b1 boolean; b2 boolean; begin" +"DBMS_APP_CONT.GET_LTXID_OUTCOME(?,b1," +"b2); ? := case when B1 then " +"'COMMITTED' else 'UNCOMMITTED' end; " +"end;");
  • 20. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Transaction Guard > With:
  • 21. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Adaptive Execution Plans > Before Oracle 12c, plans were fixed for the first execution. > Unexpected high row counts may make first plan suboptimal. > With 12, the Optimizer can now generate plan + subplans.
 > Optimizer picks final plan based on cardinality during first execution. > “Changes its mind” in realtime!

  • 22. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Adaptive Execution Plans
  • 23. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Adaptive Execution Plans -------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 23 | 4 (0)| 00:00:01 | | 1 | HASH UNIQUE | | 1 | 23 | 4 (0)| 00:00:01 | |- * 2 | HASH JOIN SEMI | | 1 | 23 | 4 (0)| 00:00:01 | | 3 | NESTED LOOPS SEMI | | 1 | 23 | 4 (0)| 00:00:01 | |- 4 | STATISTICS COLLECTOR | | | | | | | * 5 | TABLE ACCESS FULL | DEPARTMENTS | 1 | 16 | 3 (0)| 00:00:01 | | * 6 | TABLE ACCESS BY INDEX ROWID BATCHED| EMPLOYEES | 1 | 7 | 1 (0)| 00:00:01 | | * 7 | INDEX RANGE SCAN | EMP_DEPARTMENT_IX | 10 | | 0 (0)| 00:00:01 | |- * 8 | TABLE ACCESS FULL | EMPLOYEES | 1 | 7 | 1 (0)| 00:00:01 | -------------------------------------------------------------------------------------------------------------- Note ----- - this is an adaptive plan (rows marked '-' are inactive) > STATISTICS COLLECTOR buffers the rows and able to switch to HASH JOIN when cardinality becomes higher than what was estimated.
  • 24. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Adaptive Execution Plans
  • 25. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Adaptive Execution Plans Rejected! Accepted!
  • 26. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Adaptive Execution Plans
  • 27. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Enhanced Statistics > New histograms: Top, Hybrid.
 > New Dynamic Sampling: 
 Dynamic Sampled statistics (now Dynamic Statistics) can be reused. 
 If defined at 2 (which is the default) dynamics statistics will be gathered if at leat one table in the query has no statistics. If defined to 11 the database will use dynamic statistics  automatically when statistics are missing, statistics are stale, statistics are insufficient.
  • 28. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Enhanced Statistics > Automatically compute statistics during loads (CATS).
  • 29. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Data Optimisation and ILM > Oracle 12c creates “Heat Maps” 
 - tracks and marks data at the row and block level as it goes through life cycle changes.
 
 > Automatic Data  Optimization  works with the Heat Map feature and allows us to create policies. > Automatic Data Optimization allows you to create policies for data compression and data movement, to implement storage tiers.
  • 30. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Data Optimisation and ILM > Data can be: Hot: the object is actively in Read/Write. Warm: the object which is accessed in reads only Cold: the object is not participating in any kind of activity.
  • 31. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Data Optimisation and ILM SQL> alter session set heat_map=on; SQL> select * from scott.emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7369 SMITH CLERK 7902 17-DEC-80 800 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 …
  • 32. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Data Optimisation and ILM select object_name, track_time "Tracking Time", segment_write "Segment write", full_scan "Full Scan", lookup_scan "Lookup Scan" from DBA_HEAT_MAP_SEG_HISTOGRAM where object_name='MYOBJECTS' and owner = 'SCOTT'; OBJECT_NAME ------------------------------------------------------------- ------------------- Tracking Time Segment write Full Scan Lookup Scan ------------------ -------------- ------------ ------------ MYOBJECTS 09-sep-13 02:40:14 NO YES NO
  • 33. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Data Optimisation and ILM ALTER TABLE scott.myobjects ILM ADD POLICY ROW STORE COMPRESS ADVANCED SEGMENT AFTER 30 DAYS OF NO MODIFICATION;
  • 34. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Row Pattern Matching > An extension to the SELECT statement using MATCH_RECOGNIZE that allows us to identify patterns across sequences of rows.
  • 35. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Row Pattern Matching PATTERN (STRT DOWN+ UP+) DEFINE DOWN AS DOWN.price < PREV(DOWN.price), UP AS UP.price > PREV(UP.price)  XYZ 13-MAR-15 35 *********************************** XYZ 14-MAR-15 34 ********************************** XYZ 15-MAR-15 33 ********************************* XYZ 16-MAR-15 34 ********************************** XYZ 17-MAR-15 35 *********************************** XYZ 18-MAR-15 36 ************************************ XYZ 19-MAR-15 37 ************************************* XYZ 20-MAR-15 36 ************************************ XYZ 21-MAR-15 35 *********************************** XYZ 22-MAR-15 34 ********************************** XYZ 23-MAR-15 35 *********************************** XYZ 24-MAR-15 36 ************************************ XYZ 25-MAR-15 37 ************************************* Any record, followed by one or more records in which the price of the stock goes down, followed by one or more records in which the stock price increases.
  • 36. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 PL/SQL enhancements.  > Define PL/SQL Subprograms in a SQL Statement. > Why would a developer want to copy logic from a PL/SQL function into a SQL statement? To improve performance. > No context switch to the PL/SQL engine.
  • 37. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases A PDB is a self-contained, fully functional Oracle Database, and includes its own system, sysaux and user tablespaces.
  • 38. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases > CDB: Similar to a conventional Oracle database. > Contains most of the working parts you will be already familiar with (controlfiles, datafiles, undo, tempfiles, redo logs etc.). > Contains the data dictionary for those objects that are owned by the root container and those that are visible to all PDBs.
  • 39. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases > PDB: Contains information specific to itself. > Made up of datafiles and tempfiles to handle it's own objects: includes it's own data dictionary, containing information about only those objects that are specific to the PDB.
  • 40. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases
  • 41. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases
  • 42. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases > Allows databases to be moved easily > Allows quick patching and upgrading to future versions. A PDB can be unplugged from a 12.1 CBD and plugged into a 12.2 CDB, effectively upgrading it in seconds.
  • 43. www.naya-tech.com | 5 Penn Plaza, 23rd floor Manhattan, New York 10001 +1.212.896.3945 Pluggable Databases 12.1.0.2
  • 44. Thank You Please visit us at www.naya-tech.com