View
77
Download
1
Category
Preview:
Citation preview
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 131
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 132
More than 12 More things about Oracle Database 12cThomas Kytehttp://asktom.oracle.com
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 134
#1 Data RedactionClick icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 135
Oracle Data Redaction
On-the-fly redaction based upon user name, IP address, application context, and other factors
Transparent, consistent enforcement in the database Minimal impact on production work loads
Redacting Sensitive Data for Applications
Credit Card #4451-2172-9841-43685106-6342-4881-52114891-3311-0090-5055
Policy
Call Centers
Decision Support Systems
Systems with PII, PHI, PCI data
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 136
#2 Temporal Validity Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 137
Temporal Validityops$tkyte%ORA12CR1> create table addresses 2 ( empno number, 3 addr_data varchar2(30), 4 start_date date, 5 end_date date, 6 period for valid(start_date,end_date) 7 ) 8 /
Table created.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 138
Temporal Validityops$tkyte%ORA12CR1> insert into addresses (empno, addr_data, start_date, end_date ) 2 values ( 1234, '123 Main Street', trunc(sysdate-5), trunc(sysdate-2) );
1 row created.
ops$tkyte%ORA12CR1> insert into addresses (empno, addr_data, start_date, end_date ) 2 values ( 1234, '456 Fleet Street', trunc(sysdate-1), trunc(sysdate+1) );
1 row created.
ops$tkyte%ORA12CR1> insert into addresses (empno, addr_data, start_date, end_date ) 2 values ( 1234, '789 1st Ave', trunc(sysdate+2), null );
1 row created.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 139
Temporal Validityops$tkyte%ORA12CR1> select * from addresses as of period for valid sysdate-3;
EMPNO ADDR_DATA START_DAT END_DATE---------- ------------------------------ --------- --------- 1234 123 Main Street 12-MAY-13 15-MAY-13
ops$tkyte%ORA12CR1> select * from addresses as of period for valid sysdate;
EMPNO ADDR_DATA START_DAT END_DATE---------- ------------------------------ --------- --------- 1234 456 Fleet Street 16-MAY-13 18-MAY-13
ops$tkyte%ORA12CR1> select * from addresses as of period for valid sysdate+3;
EMPNO ADDR_DATA START_DAT END_DATE---------- ------------------------------ --------- --------- 1234 789 1st Ave 19-MAY-13
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1310
#3 SQL Text Expansion Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1311
SQL Text Expansionops$tkyte%ORA12CR1> variable x clob
ops$tkyte%ORA12CR1> begin 2 dbms_utility.expand_sql_text 3 ( input_sql_text => 'select * from all_users', 4 output_sql_text => :x ); 5 end; 6 /
PL/SQL procedure successfully completed.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1312
SQL Text Expansionops$tkyte%ORA12CR1> print x
X--------------------------------------------------------------------------------SELECT "A1"."USERNAME" "USERNAME","A1"."USER_ID" "USER_ID","A1"."CREATED" "CREATED","A1"."COMMON" "COMMON" FROM (SELECT "A4"."NAME" "USERNAME","A4"."USER#" "USER_ID","A4"."CTIME" "CREATED",DECODE(BITAND("A4"."SPARE1",128),128,'YES','NO') "COMMON" FROM "SYS"."USER$" "A4","SYS"."TS$" "A3","SYS"."TS$" "A2" WHERE "A4"."DATATS#"="A3"."TS#" AND "A4"."TEMPTS#"="A2"."TS#" AND "A4"."TYPE#"=1) "A1"
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1313
#4 Increased Size Limit for VARCHAR2, NVARCHAR2, and RAW Data Types
Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1314
32k Strings
Varchar2, NVarchar2 and Raw datatypes may be upto 32k in size, like in PL/SQL
Compatible = 12.0.0.0 or higher Max_String_Size init.ora set to EXTENDED (default is not this) Not supported in clustered and index organized tables Will be stored out of line (LOB) but work just like long strings to your
program
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1315
#5 Easy Top-N and pagination queries Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1316
Row Limiting Clause
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1317
Row Limiting Clause
c##tkyte%CDB1> create table t 2 as 3 select * from stage;Table created.
c##tkyte%CDB1> create index t_idx on t(owner,object_name);Index created.
c##tkyte%CDB1> set autotrace on explain
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1318
Row Limiting Clause
c##tkyte%CDB1> select /*+ first_rows(5) */ owner, object_name, object_id 2 from t 3 order by owner, object_name 4 FETCH FIRST 5 ROWS ONLY;…---------------------------------------------------------------------------------------| 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)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1319
Row Limiting Clause
c##tkyte%CDB1> select /*+ first_rows(5) */ owner, object_name, object_id 2 from t 3 order by owner, object_name 4 OFFSET 5 ROWS FETCH NEXT 5 ROWS ONLY;…---------------------------------------------------------------------------------------| 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"<=CASE WHEN (5>=0) THEN 5 ELSE 0 END +5 AND "from$_subquery$_003"."rowlimit_$$_rownumber">5) 2 - filter(ROW_NUMBER() OVER ( ORDER BY "OWNER","OBJECT_NAME")<=CASE WHEN (5>=0) THEN 5 ELSE 0 END +5)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1320
Row Limiting Clause
c##tkyte%CDB1> select owner, object_name, object_id 2 from t 3 order by owner, object_name 4 FETCH NEXT 0.01 PERCENT ROWS ONLY;… 9 rows selected.------------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 87310 | 25M| | 1230 (1)| 00:00:01 ||* 1 | VIEW | | 87310 | 25M| | 1230 (1)| 00:00:01 || 2 | WINDOW SORT | | 87310 | 3069K| 4120K| 1230 (1)| 00:00:01 || 3 | TABLE ACCESS FULL| T | 87310 | 3069K| | 401 (1)| 00:00:01 |------------------------------------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
1 - filter("from$_subquery$_003"."rowlimit_$$_rownumber"<=CEIL("from$_sub query$_003"."rowlimit_$$_total"*0.01/100))
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1321
#6 Temporary UNDO Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1322
Temporary UNDO
UNDO for temporary tables can now be managed in TEMP Reduce the amount of UNDO in the UNDO tablespace
– Better for retention periods for “real” data Reduce the size of the redo generated Allows for DML on temporary tables in Active Data Guard
ALTER SYSTEM/SESSION SET TEMP_UNDO_ENABLED=true|false
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1323
#7 Online Operations Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1324
More Online Operations
DROP INDEX ONLINE DROP CONSTRAINT ONLINE SET UNUSED COLUMN ONLINE ALTER INDEX UNUSABLE ONLINE ALTER INDEX [VISIBLE | INVISIBLE]
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1325
#8 Data Optimization Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1326
ILM: Hot/Cold Data ClassificationEnhanced Insight into Data Usage: “heat map”
Recently inserted, actively updated Infrequently updated,
Frequently Queried
Retained for long term analytics and compliance with corporate policies and regulations
ACTIVEFREQUENTACCESS
DORMANT
• Block and Segment level statistics on last Read and last Update
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1327
ILM: Automatic Compression & TieringUsage based and custom compression and tiering
ALTER TABLE ordersILM ADD CompressionPolicy COMPRESS Partitions for QueryAFTER 90 days from creation;
ALTER TABLE sales ILM ADD MovePolicyTIER Partitions TO ‘Archive_TBS’ ON OrdersClosedPolicy;
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1328
#9 Implicit Result Sets Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1329
Implicit Result Sets
Cursor variables have been around since 7.2 Used to return result sets explicitly Some other databases return them implicitly Causes migration headaches
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1330
Implicit Result Sets
Two new API calls:– PROCEDURE RETURN_RESULT
(rc IN OUT SYS_REFCURSOR, to_client IN BOOLEAN DEFAULT TRUE); – PROCEDURE RETURN_RESULT
(rc IN OUT INTEGER, to_client IN BOOLEAN DEFAULT TRUE);
– TO_CLIENT => true, return to client layer– TO_CLIENT=> false, return to invoker, immediate caller
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1331
Implicit Result Setsops$tkyte%ORA12CR1> declare 2 c sys_refcursor; 3 begin 4 open c for 5 select * 6 from dept; 7 8 dbms_sql.return_result(c); 9 end; 10 /PL/SQL procedure successfully completed.
ResultSet #1
DEPTNO DNAME LOC---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1332
Implicit Result Sets
Two new API calls:– PROCEDURE GET_NEXT_RESULT
(c IN INTEGER, rc OUT SYS_REFCURSOR); – PROCEDURE GET_NEXT_RESULT
(c IN INTEGER, rc OUT INTEGER);
– For PL/SQL processing
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1333
Implicit Result SetsConnection conn = DriverManager.getConnection(jdbcURL, user, password);try { Statement stmt = conn.createStatement (); stmt.executeQuery ( “begin foo; end;” ); while (stmt.getMoreResults()) { ResultSet rs = stmt.getResultSet(); System.out.println("ResultSet"); while (rs.next()) { /* get results */ } }}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1334
#10 Pluggable Databases Click icon to add picture
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1335
Oracle Database ArchitectureRequires memory, processes and database files
ERP
Database Files
BackgroundProcesses
MemoryUtilized
RAM
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1336
Oracle Database ArchitectureSeparate memory and processes required for each database
ERP
Database Files
MemoryUtilized
BackgroundProcesses
RAM
CRM
Database Files
BackgroundProcesses
MemoryUtilized
RAM
DW
Database Files
BackgroundProcesses
MemoryUtilized
RAM
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1337
New Pluggable Database Architecture
ERP
Database Files
MemoryUtilized
BackgroundProcesses
CRM
Database Files
MemoryUtilized
BackgroundProcesses
RAM
DW
Database Files
MemoryUtilized
BackgroundProcesses
RAMRAM
Memory and processes required at container level only
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1338
New Pluggable Database ArchitectureMemory and processes required at container level only
RAM ERP CRM DW
BackgroundProcesses
MemoryUtilized Container Database
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1339
#11 Database In-Memory Click icon to add picture
40Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle InternalCopyright © 2013, Oracle and/or its affiliates. All rights reserved.40
Flip FlopsCoreICs on board
DIMMS
SIMMs
SSD
Flash
Small Drives
Floppy
Big Drives
1993 ~$25/mb; $26,214,400/tb
2014 ~$0.007/mb; $7,645/tb
41Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle InternalCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
Until Now You Choose One Format and Suffer Tradeoffs
Optimizing Transaction and Query Performance Row Format Databases versus Column Format Databases
Row
Transactions run faster on row format– Fast for processing few rows, many
columns– Example: Insert or query a sales order
Column
Analytics run faster on column format– Fast for processing few columns, many
rows– Example: Report on sales totals by state
ORDER
SALES
SALES
STATE
41
42Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle InternalCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
OLTP is Slowed Down by Analytic Indexes
Table1 to 3OLTP
Indexes
5 to 15 AnalyticsIndexes
Most Indexes in mixed-use OLTP (e.g. ERP) databases are only used for analytics
Indexes work well for known access patterns both in-memory and on-disk
But every change to the table requires changing all analytic indexes – Slow!
42
43Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle InternalCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
Column Store Replaces Analytic Indexes
Table1 to 3OLTP
Indexes
In-Memory Column Store replaces analytic indexes for tables that fit in memory
Removes analytic index overhead on changes
Both predefined and ad-hoc analytic queries run fast Less tuning & admin needed
OLTP & batch often run 2x or more faster
In-Memory Column Store
43
44Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle InternalCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory is Trivial to Deploy
1. Configure Memory Capacity inmemory_size = XXXX GB
2. Configure tables or partitions to be in memory alter table | partition … inmemory;
3. Later Drop analytic indexes to speed up OLTP
44
45Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle InternalCopyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory is Transparent to ApplicationsExisting Applications Just Run Faster
Full Functionality - No restrictions on SQLTrivial to Implement - No migration of data or change of productFully Compatible - All existing applications run unchangedDB as a Service Ready - Oracle Multitenant in-memory
Uniquely Achieves All In-Memory Benefits With No Application Changes
And All Other Apps that Support Oracle Database
45
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template46
#12 A few more 12.1.0.2 bits and pieces
Insert Picture Here
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template47
Advanced Index Compression
Compresses indexes to reduce their overall storage requirement– Less space required on disk– Better use of the database cache
Indexes are compressed by between 1 – 3 times Little or no discernable overhead Compression Advisor extended to describe the possible benefits of this
feature
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template48
Attribute Clustering
Ordering of data so that rows are stored near one another based on column values
Improved query performance and concurrency– Reduced physical data access trough smart IO– Significant IO reduction for highly selective operations
Optimized space utilization– Less need for indexes– Improved compression ratios through data clustering
Full application transparency– Any application will benefit
Benefits :
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template49
Zone Maps
Persisted storage index
Stores minimum and maximum of specified columns Analogous to a coarse index structure
– Much more compact than an index– Zone maps filter out what you don’t need, indexes find what you do need
Significant performance benefits with complete application transparency– IO reduction for table scans with predicates on the table itself or even a
joined table using join zone maps (a.k.a. “hierarchical zone map”) Benefits are most significant with ordered data
– Used in combination with attribute clustering or data that is naturally ordered
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template50
50
Approximate Count Distinct
Not every query requires a completely accurate result– “How many distinct individuals visited our website last week?”
New SQL function for approximate results for COUNT DISTINCT aggregates– APPROX_COUNT_DISTINCT()
Approximate results can be significantly faster and use less resources than exact calculations
– 5x to 50x ++ times faster (depending upon number of distinct values and complexity of SQL)
– Accuracy > 97% (with 95% confidence)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template51
Graphic Section Divider
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Confidential – Oracle Highly Restricted
The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Recommended