DB12c Tuning New Features Alex Zaballa PDF
DB12c Tuning New Features Alex Zaballa PDF
http://alexzaballa.blogspot.com/
• http://docs.oracle.com/database/121/NEWFT
/chapter12102.htm
• https://apexapps.oracle.com/pls/apex/f?p=44
785:1:0
Articles about 12c
• https://oracle-base.com/articles/12c/articles-
12c
• http://www.oraclealchemist.com/news/install
-oracle-12c-12-1/
• http://www.profissionaloracle.com.br/
“With more than 500 new features, Oracle
Database 12c is designed to give Oracle
customers exactly what they’ve told us they
need for cloud computing, big data, security,
and availability.”
Multitenant
Is it a Tuning Feature?
Source: Oracle Documentation
Multitenant
Source: https://blogs.oracle.com/UPGRADE/entry/non_cdb_architecture_of_oracle
Multitenant
Source: https://blogs.oracle.com/UPGRADE/entry/non_cdb_architecture_of_oracle
Multitenant
Source: https://blogs.oracle.com/UPGRADE/entry/non_cdb_architecture_of_oracle
In-Memory
Source: http://www.oracle.com/technetwork/database/in-memory/overview/twp-
oracle-database-in-memory-2245633.html
In-Memory
Is it a Tuning Feature?
Source: OracleBase.com
In-Memory
Alter table hr.EMPLOYEES inmemory;
Source: http://www.oracle.com/technetwork/database/in-memory/overview/twp-
oracle-database-in-memory-2245633.html
SQL Query Row Limits and Offsets
SQL Query Row Limits and Offsets
SQL Query Row Limits and Offsets
Top-N Queries – Pré 12c
SELECT DBMS_STATS.get_prefs('GLOBAL_TEMP_TABLE_STATS')
FROM dual;
STATS
------------------------------------------------------------------------------
SESSION
Session private statistics for Global
Temporary Tables
How to change?
Behavior pre 12c:
BEGIN
DBMS_STATS.set_global_prefs (
pname => 'GLOBAL_TEMP_TABLE_STATS',
pvalue => 'SHARED');
END;
/
BEGIN
dbms_stats.set_table_prefs('SCOTT','GTT_TESTE',
'GLOBAL_TEMP_TABLE_STATS','SHARED');
END;
BEGIN
dbms_stats.set_table_prefs('SCOTT','GTT_TESTE',
'GLOBAL_TEMP_TABLE_STATS’,’SESSION');
END;
DEMO
Temporary Undo
Global Temporary Tables (GTT) hold the data in a
temporary tablespace. The data in GTTs are either
deleted after commit or kept until the session is
connected depending of the definition of the
GTT.(ON COMMIT PRESERVE OR DELETE ROWS ).
Pre 12c:
- 2 GB (default value)
- 200% of PGA_AGGREGATE_TARGET
- 3 MB times the PROCESSES parameter
Statistics During Loads
The ability to gather statistics automatically
during bulk loads:
Adaptive Plans
Why?
Optimizer mistakes
Estimated Rows and Actual rows are different
• MONITOR Hint
SELECT /*+ MONITOR */
SELECT DBMS_SQLTUNE.report_sql_monitor(
sql_id => '5dhu4w0j59yp7',
type => 'HTML',
report_level => 'ALL') AS report
FROM dual;
SPOOL OFF
Real-Time SQL Monitoring
DEMO
Oracle Database 12.2
Oracle Announces Beta Availability of Oracle Database 12c Release 2 - Oct 26,
2015
• PLUGGABLE DATABASES
From 252 to 4096
• HOT CLONING
Don’t need to put the source in read-only for cloning
• SHARDING
It’s like partitioning in a shared nothing database
The data is split into multiple databases
• In-Memory
In-Memory column Store on Active Data Guard
Heat Map
• APPLICATION CONTAINER
Pluggable Databases will share application objects
• More isolation, resource manager will limit the memory in addition to CPU and I/O.
• AWR will work on Active Data Guard Database: you can tune your reporting database
Availability of Oracle Database 12.2
Source: https://blogs.oracle.com/UPGRADE/entry/oracle_database_12_2_just
Oracle Database Release Status
MOS Note:742060.1
SQLcl
Thank You