11g r2
TRANSCRIPT
Lowering your IT Costswith Oracle Database 11g Release 2
Thomas Kyte http://asktom.oracle.com
Continuous Innovation
Exadata StorageExadata Storage Real Application Real Application
TestingTesting Advanced Compression Advanced Compression
Automatic Automatic Storage Management Storage Management Transparent Data Encryption Transparent Data Encryption Self Managing Database Self Managing Database XML DatabaseXML Database Oracle Data Guard Oracle Data Guard Real Application Clusters Real Application Clusters Flashback Query Flashback Query Virtual Private Database Virtual Private Database Built in Java VMBuilt in Java VM Partitioning Support Partitioning Support Built in Messaging Built in Messaging Object Relational Support Object Relational Support Multimedia Support Multimedia Support Data Warehousing OptimizationsData Warehousing Optimizations Parallel Operations Parallel Operations Distributed SQL & Transaction Support Distributed SQL & Transaction Support Cluster and MPP Support Cluster and MPP Support Multi-version Read Consistency Multi-version Read Consistency Client/Server Support Client/Server Support Platform Portability Platform Portability Commercial SQL Implementation Commercial SQL Implementation
Oracle 2Oracle 9i
Oracle 5
Oracle 6
Oracle 7
Oracle 8
Oracle 8i
Oracle 10g
Oracle 11g
<Insert Picture Here>
Clustering
Consolidate onto the GridUsing low-cost server and storage grids
EnterpriseManager
Automatic Storage Management
In-Memory Database Cache
Real Application Clusters
Oracle Database 11g Release 2Dynamic Cluster Partitioning via Server Pools
• Dynamically assigns servers to run groups of related workload• Allocation is Policy Managed – Min/Max, Relative Importance• Unassigned Servers go to Free Pool• Cluster reconfigures if a pool falls below its minimums
Back Office Front Office Depart/LOB Free
• Low entry cost to grid consolidation• Automated failover within Grid• Rolling patches• Online upgrade to multi-node RAC instances
RAC One NodeNew Enterprise feature for mass consolidation
DB BDB C
DB DDB E
DB FDB A
<Insert Picture Here>
Hardware
Sun Oracle Database MachineGet on the Grid Faster - OLTP & Data Warehousing
Oracle Database Server Grid• 8 Database Servers
– 64 Cores – 400 GB DRAM
Exadata Storage Server Grid• 14 Storage Servers
– 5TB Smart Flash Cache– 336 TB Disk Storage
Unified Server/Storage Network• 40 Gb/sec Infiniband Links
– 880 Gb/sec Aggregate Throughput
Completely Fault Tolerant
8
Sun Exadata Storage Server Hardware
24 GB DRAM
12 x 3.5” Disk Drives
2 Quad-Core Intel®
Xeon® Processors
Disk Controller HBA with 512M battery backed cache
InfiniBand QDR (40Gb/s) dual port card
Dual-redundant, hot-swappable power
supplies
4 x 96GB Sun Flash PCIe Cards
Flash CacheHow it works
120 GB Flash Cache
120 GB Flash Cache
16 GB SGA Memory
16 GB SGA Memory
360 GBMagnetic Disks
360 GBMagnetic Disks
Install Flash Drive in the Host Server
• Set two init.ora parameters:• db_flash_cache_file = <filename>
• Specifies the path to the flash disk
• db_flash_cache_size=<size>• Specifies the amount of flash disk to use
Install Flash Drive in the Host Server
• Set two init.ora parameters:• db_flash_cache_file = <filename>
• Specifies the path to the flash disk
• db_flash_cache_size=<size>• Specifies the amount of flash disk to use
Extended Buffer Cache
11
World’s Fastest OLTP MachineWith Sun FlashFire Technology
• Huge semiconductor memory hierarchy– 400 Gigabytes DRAM– 5 TB Smart Flash Cache – Not Flash Disk !!!
• 1 Million random I/Os per second– Eliminates most physical disk I/O
• 3x database compression for OLTP– Compressed 1.2 TB Database in DRAM – Compressed 15 TB Database in Flash Cache
<Insert Picture Here>
IMDB
Oracle In Memory Database CacheOffload Data processing to Middle Tier resources
• Data cached in application memory
• Synchronized with Oracle Database
• Fast, consistent response times
– High transaction throughput
– Scale out with In-Memory cached Grid
• Standard Oracle Interfaces
– SQL, PL/SQL, OCI
Cached tables
BusinessApplications
Cached tables
BusinessApplications
<Insert Picture Here>
Warehousing
Oracle Database 11g Release 2In-Memory Parallel Execution
• Data warehouse environments can have large amounts of memory that is not always used
• An algorithm places fragments of an object (partitions) in memory on different nodes
• Compression gets more data in memory
• Parallel servers (aka PQ Slaves) are then executed on the corresponding nodes
• Requires Automatic Degree of Parallelism
Real ApplicationClusters
In-Memory Parallel ExecutionHow it works
SQLstatement
Determine the size of the table being looked at
Read into the buffer cache on any node
Table is extremely small
Always use direct read from disk
Table is a good candidate for In-Memory Parallel
Execution
Table is extremely Large
Fragments of Table are read into each node’s
buffer cache
Only parallel server on the same RAC node
will access each fragment
Automated Degree of ParallelismHow it works
SQLstatement
Statement is hard parsedAnd optimizer determines
the execution plan
Statement executes serially
Statement executes in parallel
Optimizer determines ideal DOP
If estimated time greater than threshold
Actual DOP = MIN(default DOP, ideal DOP)If estimated time
less than thresholdPARALLEL_MIN_TIME_THRESHOLD
Parallel Statement QueuingHow it works
SQLstatements
Statement is parsedand Oracle automatically
determines DOP
If enough parallel servers available
execute immediately
If not enough parallel servers available queue
128163264
8
FIFO Queue
When the required number of parallel servers become available the first
stmt on the queue is dequeued and executed
128
163264
Query Processing:The problem with traditional storage
What Were Yesterday’s
Sales?
SUM
Oracle Database Server Grid Storage Array
Retrieve Entire Sales
Table
Select sum(sales) where
salesdate= ‘15-Sep-2009’ …
Query Processing: Using Sun Oracle Exadata Storage Server
What Were Yesterday’s
Sales?
SUM
Oracle Exadata Storage Grid
Select sum(sales) where
salesdate= ‘15-Sep-2009’ …
Retrieve Sales for Sep 15 2009
Oracle Database Server Grid
<Insert Picture Here>
Storage
Reduce storage costs by factor of 10xData growth continues to outpace budget growth
Source: Winter TopTen Survey, Winter Corporation, Waltham MA, 2008.
200
400
600
800
1000
1998 2000 2002 2004 2006 2008 2010
Actual
Projected
Ter
abyt
es o
f D
ata
Rate of Database Growth
Automatic Storage ManagementLowers the cost of storage management
• Virtualize and share storage resources• Advanced data striping for maximum I/O performance• Online addition and migration of storage
HR SALES ERP
Oracle Database 11g Release 2ASM Cluster File System
• General purpose clustered or local file system• Optimized disk layout, online rebalance, mirroring• Dynamic volume management, read-only snapshots
HR SALES ERP
Database Files Oracle Binaries Files
Oracle Database 11g Release 2Other ASM Enhancements
• Improved Management– ASM Install &
Configuration Assistant (ASMCA)
– Full Featured ASMCMD– ASM File Access Control– ASM Disk Group Rename– Datafile to Disk Mapping
• Tunable Performance– Intelligent Data Placement
Infrequently Accessed
Data
Infrequently Accessed
Data
Frequently Accessed
Data
Frequently Accessed
Data
© 2009 Oracle Corporation – Proprietary and Confidential
5% Active5% Active95% Less Active95% Less Active
ORDERS TABLE (7 years)
High End Storage Tier
2003
Manage Data Growth Partition for performance, management and cost
2009
Low End Storage Tier 2-3x less per terabyte
2008
Significantly Reduce Storage UsageAdvanced OLTP Compression
• Compress large application tables– Transaction processing, data warehousing
• Compress all data types– Structured and unstructured data types
• Improve query performance– Cascade storage savings throughout data center
Compression4XUp To
• Data stored by columnand then compressed
• Useful for data that is bulk loaded or moved
• Query mode for data warehousing– Typical 10X compression ratios– Scans improve accordingly
• Archival mode for old data– Typical 15- 50X compression ratios
Sun Oracle Exadata Storage ServerHybrid Columnar Compression
50XUp To
<Insert Picture Here>
Availability
Oracle Maximum Availability ArchitectureFully Utilizing Redundancy
Automatic Storage Management
Real Application Clusters
Secure Backups to Cloud and Tape
ActiveData Guard
FastRecovery Area
Data Guard
Traditional Testing Approach Production – 1,000s of Real Online Users
PRODUCTION
Limited Testing Capabilities Few users trying to be 1,000s of users
TESTPRODUCTION
Real Application TestingWorkload for 1,000s of Online Users Captured
PRODUCTION
Workload
Capture
Real Application TestingWorkload for 1,000s of Online Users Replayed
Replay
PRODUCTION TEST
Capture
Workload
Online Application UpgradeEdition-based redefinition
• Code changes are installed in the privacy of a new edition
• Data changes are made safely by writing only to new columns or new tables not seen by the old edition
• An editioning view exposes a different projection of a table into each edition to allow each to see just its own columns
• A crossedition trigger propagates data changes made by the old edition into the new edition’s columns, or (in hot-rollover) vice-versa
Online Application UpgradeEdition-based redefinition
ops$tkyte%ORA11GR2> create user demo identified by demo
2 /
User created.
ops$tkyte%ORA11GR2> grant create session, create procedure to demo
2 /
Grant succeeded.
ops$tkyte%ORA11GR2> create edition version2 as child of ora$base
2 /
Edition created.
Online Application UpgradeEdition-based redefinition
ops$tkyte%ORA11GR2> connect demo/demoConnected.demo%ORA11GR2> demo%ORA11GR2> create or replace procedure my_procedure 2 as 3 begin 4 dbms_output.put_line( 'Hello World, I am version 1.0' ); 5 end; 6 /Procedure created.
demo%ORA11GR2> create or replace procedure my_procedure2 2 as 3 begin 4 my_procedure; 5 end; 6 /Procedure created.
Online Application UpgradeEdition-based redefinition
demo%ORA11GR2> exec my_procedure2
Hello World, I am version 1.0
PL/SQL procedure successfully completed.
Online Application UpgradeEdition-based redefinition
demo%ORA11GR2> connect /
Connected.
ops$tkyte%ORA11GR2> alter user demo enable editions
2 /
User altered.
ops$tkyte%ORA11GR2> grant use on edition version2 to demo
2 /
Grant succeeded.
Online Application UpgradeEdition-based redefinition
ops$tkyte%ORA11GR2> connect demo/demo
Connected.
demo%ORA11GR2> alter session set edition = version2
2 /
Session altered.
demo%ORA11GR2> set linesize 150
demo%ORA11GR2> select object_name, object_type, status, edition_name from user_objects
2 /
OBJECT_NAME OBJECT_TYPE STATUS EDITION_NAME
---------------- -------------- ------- ---------------
MY_PROCEDURE PROCEDURE VALID ORA$BASE
MY_PROCEDURE2 PROCEDURE VALID ORA$BASE
Online Application UpgradeEdition-based redefinition
demo%ORA11GR2> create or replace procedure my_procedure
2 as
3 begin
4 dbms_output.put_line( 'Hello World, I am version 2.0' );
5 end;
6 /
Procedure created.
demo%ORA11GR2> select object_name, object_type, status, edition_name from user_objects
2 /
OBJECT_NAME OBJECT_TYPE STATUS EDITION_NAME
--------------- ------------------- ------- --------------
MY_PROCEDURE2 PROCEDURE VALID ORA$BASE
MY_PROCEDURE PROCEDURE VALID VERSION2
Online Application UpgradeEdition-based redefinition
demo%ORA11GR2> SELECT SYS_CONTEXT('userenv', 'current_edition_name') FROM DUAL;
SYS_CONTEXT('USERENV','CURRENT_EDITION_NAME')
--------------------------------------------------
VERSION2
demo%ORA11GR2> exec my_procedure2
Hello World, I am version 2.0
PL/SQL procedure successfully completed.
Online Application UpgradeEdition-based redefinition
demo%ORA11GR2> connect demo/demo
Connected.
demo%ORA11GR2> SELECT SYS_CONTEXT('userenv', 'current_edition_name') FROM DUAL;
SYS_CONTEXT('USERENV','CURRENT_EDITION_NAME')
----------------------------------------------ORA$BASE
demo%ORA11GR2> exec my_procedure2
Hello World, I am version 1.0
PL/SQL procedure successfully completed.
Online Application UpgradeEdition-based redefinition
demo%ORA11GR2> alter session set edition = version2;
Session altered.
demo%ORA11GR2> SELECT SYS_CONTEXT('userenv', 'current_edition_name') FROM DUAL;
SYS_CONTEXT('USERENV','CURRENT_EDITION_NAME')-----------------------------------------------VERSION2
demo%ORA11GR2> exec my_procedure2Hello World, I am version 2.0
PL/SQL procedure successfully completed.
<Insert Picture Here>
How to get there
What are my upgrade paths?Predictable performance post-upgrade
10.2.0.2
10.2.0.2
11.1.0.6
11.1.0.6
10.1.0.510.1.0.5
9.2.0.89.2.0.8
11.211.2
SQL Plan ManagementAutomated SQL tuning
Rolling Database Upgrades
Major ReleaseUpgrades
Patch SetUpgrades
Cluster Software & Hardware Upgrades
Initial SQL Apply Config
ClientsRedo
Version X Version X
1
BA
Switchover to B, upgrade A
Redo
4
Upgrade
X+1X+1
BA
Run in mixed mode to test
Redo
3
X+1X
A B
Upgrade node B to X+1
Upgrade
LogsQueue
X
2
X+1
A B
……
ClientClient
…Client
Capture DB Workload
Make Change Safe - Realistic Testing with Database Replay
• Recreate actual production database workload in test environment
• No test development required
• Replay workload in test with production timing
• Analyze & fix issues before production
Middle Tier
Storage
Oracle DB
Replay DB Workload
Production
9i, 10g, 11g
Test
11g Release 1 and above
For More Information
http://search.oracle.com
or
www.oracle.com/database
oracle database 11g