SlideShare a Scribd company logo
1 of 81
Top 10, no – make that 11, things about  Oracle Database 11g Release 1 Thomas Kyte http://asktom.oracle.com
The Beginning... ,[object Object],[object Object],[object Object],[object Object],“ A  Relational Model for Large Shared Databanks” E.F. Codd - 1970
First RDBMS: Version 2  June 1979 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Oracle7.3  February 1996 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
 
Oracle Database Innovation 30 years of sustained innovation … …  continuing with Oracle Database 11g Audit Vault   Database Vault   Grid Computing   Self Managing Database    XML Database   Oracle Data Guard   Real Application Clusters   Flashback Query   Virtual Private Database   Built in Java VM   Partitioning Support   Built in Messaging   Object Relational Support   Multimedia Support   Data Warehousing Optimizations   Parallel Operations   Distributed SQL & Transaction Support   Cluster and MPP Support   Multi-version Read Consistency   Client/Server Support   Platform Portability   Commercial SQL Implementation 1977 2007
 
#1 Encrypted Tablespaces
Encrypted Tablespaces ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Encrypted Tablespaces ops$tkyte%ORA11GR1> create tablespace encrypted 2  datafile '/…/encrypted.dbf' size 10m 3  ENCRYPTION  default storage(  encrypt  ); Tablespace created. ops$tkyte%ORA11GR1> create tablespace clear 2  datafile '/…/clear.dbf' size 10m; Tablespace created.
Encrypted Tablespaces ops$tkyte%ORA11GR1> create table t 2  tablespace  clear 3  as 4  select * from all_users; Table created. ops$tkyte%ORA11GR1> create index t_idx 2  on t(lower(username)) 3  tablespace  clear ; Index created.
Encrypted Tablespaces ops$tkyte%ORA11GR1> alter system checkpoint; System altered. $ strings /…/clear.dbf | grep -i ops.tkyte OPS$TKYTE from the table ops$tkyte from the index
Encrypted Tablespaces ops$tkyte%ORA11GR1> alter table t move 2  tablespace  encrypted ; Table altered. ops$tkyte%ORA11GR1> alter index t_idx rebuild 2  tablespace  encrypted ; Index altered.
Encrypted Tablespaces ops$tkyte%ORA11GR1> alter system checkpoint; System altered. $ strings /…/encrypted.dbf | grep -i ops.tkyte [This space intentionally left blank]
Encrypted Tablespaces ps$tkyte%ORA11GR1> set autotrace traceonly explain ops$tkyte%ORA11GR1> select * from t where lower(username) like 'ops$%'; Execution Plan ------------------------------------------------------------- | Id  | Operation  | Name  | Rows  | Bytes | ------------------------------------------------------------- |  0 | SELECT STATEMENT  |  |  2 |  112 | |  1 |  TABLE ACCESS BY INDEX ROWID| T  |  2 |  112 | |*  2 |  INDEX RANGE SCAN   | T_IDX |  1 |  | ------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access(LOWER("USERNAME") LIKE 'ops$%') filter(LOWER("USERNAME") LIKE 'ops$%')
#2 Cache More Stuff
Cache More ,[object Object],[object Object],[object Object],[object Object],[object Object]
Cache More ops$tkyte%ORA11GR1> /* ops$tkyte%ORA11GR1> drop table t; ops$tkyte%ORA11GR1> create table t as select * from all_objects; ops$tkyte%ORA11GR1> */ ops$tkyte%ORA11GR1> update t set object_type=object_type where rownum=1; 1 row updated.
Cache More ops$tkyte%ORA11GR1> set autotrace traceonly ops$tkyte%ORA11GR1> select /*+ result_cache */ 2  owner, 3  object_type, 4  count(*) cnt 5  from t 6  group by owner, object_type 7  order by owner, object_type 8  / 249 rows selected.
Cache More Execution Plan -------------------------------------------------------------------------------------------------- | Id  | Operation  | Name  | Rows  | Bytes | Cost (%CPU)| Time  | -------------------------------------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  | 58742 |  1606K|  284  (2)| 00:00:04 | |  1 |  RESULT CACHE  | 5cwffcum1ajfud1088m1m73f81 |  |  |  |  | |  2 |  SORT GROUP BY  |  | 58742 |  1606K|  284  (2)| 00:00:04 | |  3 |  TABLE ACCESS FULL| T  | 58742 |  1606K|  280  (1)| 00:00:04 | -------------------------------------------------------------------------------------------------- Result Cache Information (identified by operation id): ------------------------------------------------------ 1 - column-count=3; dependencies=(OPS$TKYTE.T); parameters=(nls); name="select /*+ result_cache */ owner, object_type, count(*) cnt from t group by owner, object_type order by"
Cache More Statistics ---------------------------------------------------------- 0  recursive calls 0  db block gets 1005  consistent gets 0  physical reads 0  redo size 6922  bytes sent via SQL*Net to client 596  bytes received via SQL*Net from client 18  SQL*Net roundtrips to/from client 1  sorts (memory) 0  sorts (disk) 249  rows processed
Cache More ops$tkyte%ORA11GR1> / 249 rows selected. Statistics ---------------------------------------------------------- 0  recursive calls 0  db block gets 0  consistent gets 0  physical reads 0  redo size 6922  bytes sent via SQL*Net to client 596  bytes received via SQL*Net from client 18  SQL*Net roundtrips to/from client 0  sorts (memory) 0  sorts (disk) 249  rows processed
Cache More ops$tkyte%ORA11GR1> select * from ( 2  select /*+ result_cache */ 3  owner, object_type, count(*) cnt 4  from t 5  group by owner, object_type 6  order by owner, object_type 7  ) 8  where cnt > 100 9  / 38 rows selected.
Cache More Statistics ---------------------------------------------------------- 0  recursive calls 0  db block gets 0  consistent gets 0  physical reads 0  redo size 1516  bytes sent via SQL*Net to client 442  bytes received via SQL*Net from client 4  SQL*Net roundtrips to/from client 0  sorts (memory) 0  sorts (disk) 38  rows processed
Cache More SQL> create or replace 2  function  not_cached 3  ( p_owner in varchar2 ) 4  return number 5  as 6  l_cnt number; 7  begin 8  select count(*) 9  into l_cnt 10  from t 11  where owner = p_owner; 12  dbms_lock.sleep(1); 13  return l_cnt; 14  end; 15  / Function created. SQL> create or replace 2  function  cached 3  ( p_owner in varchar2 ) 4  return number 5  result_cache 6  relies_on(T) 7  as 8  l_cnt number; 9  begin 10  select count(*) 11  into l_cnt 12  from t 13  where owner = p_owner; 14  dbms_lock.sleep(1); 15  return l_cnt; 16  end; 17  / Function created.
Cache More SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.93 SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.29 SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.07
Cache More SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.09 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01
Cache More SQL> update t set owner = initcap(owner) where rownum = 1; 1 row updated. SQL> commit; Commit complete. SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.25 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01
Cache More SQL> exec dbms_output.put_line( cached( 'SYS' ) ); 29339 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.21 SQL> exec dbms_output.put_line( cached( 'SYS' ) ); 29339 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.00
#3 Standby Just got better
Standby Database ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standby Database ,[object Object],[object Object],[object Object],[object Object]
Active Data Guard:  Develop & Test on Standby DB ,[object Object],[object Object],[object Object],Production Database Standby  Database Developers, Testers Eliminates cost of  idle DR system
Active Data Guard:  Report & Backup from Standby DB ,[object Object],[object Object],[object Object],[object Object],Production Database Standby  Database Reporting Backups Improves performance on production database
Active Data Guard –  More than a Standby Simultaneous read and  recovery High ROI Automated Disaster  and  performance protection Use daily in testing and production Recovery mode only Low ROI Manual intensive Disaster protection only Used in disaster only
#4 Real Application Testing
Real Application Testing – Database Replay ,[object Object],[object Object],[object Object],[object Object],Middle Tier Capture DB Workload Storage Oracle DB servers Replay DB Workload Production Environment Test (RAC) Environment`
#5 Smaller more secure DMP files
Datapump ,[object Object],[object Object],$ expdp / directory=tmp dumpfile=uncompressed.dmp compression= NONE  schemas=opstkyte Export: Release 11.1.0.6.0 - Production on Friday, 21 September, 2007 12:23:26 . . exported "OPS$TKYTE"."BIG_TABLE"  24.57 MB  250000 rows . . exported "OPS$TKYTE"."T"  6.791 MB  67945 rows $ expdp / directory=tmp dumpfile=compressed.dmp compression= ALL  schemas=opstkyte Export: Release 11.1.0.6.0 - Production on Friday, 21 September, 2007 12:23:58 . . exported "OPS$TKYTE"."BIG_TABLE"  3.110 MB  250000 rows . . exported "OPS$TKYTE"."T"  762.1 KB  67945 rows $ ls -l /tmp/*compressed.dmp -rw-r-----  1 ora11gr1 ora11gr1  4124672 Sep 21 12:24 /tmp/compressed.dmp -rw-r-----  1 ora11gr1 ora11gr1 33136640 Sep 21 12:23 /tmp/uncompressed.dmp
Datapump ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
#6 Virtual Columns
Virtual Columns ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Virtual Columns ops$tkyte%ORA11GR1> /* ops$tkyte%ORA11GR1> create table emp ops$tkyte%ORA11GR1> as ops$tkyte%ORA11GR1> select all_objects.*, object_id sal,  round(dbms_random.value( 1000, 100000 )) comm ops$tkyte%ORA11GR1>  from all_objects ops$tkyte%ORA11GR1> / ops$tkyte%ORA11GR1> ops$tkyte%ORA11GR1> */ ops$tkyte%ORA11GR1> exec dbms_stats.gather_table_stats( user, 'EMP' ) PL/SQL procedure successfully completed.
Virtual Columns ops$tkyte%ORA11GR1> select avg( sal+comm ) avg_comp, avg(sal) avg_sal, avg(comm) avg_comm from emp; AVG_COMP  AVG_SAL  AVG_COMM ---------- ---------- ---------- 85376.9437 34821.6827  50555.261 ops$tkyte%ORA11GR1> select  count(case when sal+comm > 85376.9437 then 1 end) above_comp, 2  count(case when sal  > 34821.6827  then 1 end) above_sal , 3  count(case when  comm > 50555.261 then 1 end) above_comm 4  from emp; ABOVE_COMP  ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957  33830  34036
Virtual Columns ops$tkyte%ORA11GR1> select * from emp where sal > 34821.6827; -------------------------------------------------------------------- | Id  | Operation  | Name | Rows  | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  | 34673 |  3893K|  309  (1)| 00:0 |*  1 |  TABLE ACCESS FULL| EMP  | 34673 |  3893K|  309  (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP  ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957  33830  34036
Virtual Columns ops$tkyte%ORA11GR1> select * from emp where comm > 50555.261; -------------------------------------------------------------------- | Id  | Operation  | Name | Rows  | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  | 33943 |  3811K|  309  (1)| 00:0 |*  1 |  TABLE ACCESS FULL| EMP  | 33943 |  3811K|  309  (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP  ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957  33830  34036
Virtual Columns ops$tkyte%ORA11GR1> select * from emp where sal+comm > 85376.9437; -------------------------------------------------------------------- | Id  | Operation  | Name | Rows  | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  |  3398  |  381K|  309  (1)| 00:0 |*  1 |  TABLE ACCESS FULL| EMP  |  3398  |  381K|  309  (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP  ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957  33830  34036
Virtual Columns ops$tkyte%ORA11GR1> ALTER TABLE emp ADD (comp AS  (sal+comm)); Table altered. ops$tkyte%ORA11GR1> exec dbms_stats.gather_table_stats( user, 'EMP', method_opt=> 'for columns  comp ' ); PL/SQL procedure successfully completed.
Virtual Columns ops$tkyte%ORA11GR1> select * from emp where sal+comm > 85376.9437; -------------------------------------------------------------------- | Id  | Operation  | Name | Rows  | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- |  0 | SELECT STATEMENT  |  |  33927  |  3975K|  309  (1)| 00:0 |*  1 |  TABLE ACCESS FULL| EMP  |  33927  |  3975K|  309  (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP  ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957  33830  34036
#7 Partitioning just got  better
Partitioning ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Enhanced Partitioning  Range List Hash Range 9i 8i List Range List Hash Range 11g 9i 8i List 11g 11g 11g JAN FEB >5000  1000- 5000 ORDERS RANGE-RANGE Order Date by  Order Value USA EUROPE >5000  1000- 5000 ORDERS LIST-RANGE Region by Order Value USA EUROPE Gold  Silver ORDERS LIST-LIST Region by  Customer Type
Partitioning by REFERENCE ,[object Object],[object Object],Table ORDERS Jan 2006 ... ... Feb 2006 Table LINEITEMS Jan 2006 ... ... Feb 2006 ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],Partitioning Automation  ORDERS Jul Aug Sep 1 2007 Sep
Partitioning ops$tkyte%ORA11GR1> create table audit_trail 2  ( ts  timestamp, 3  data  varchar2(30) 4  ) 5  partition by range(ts) 6  interval (numtodsinterval(1,'day')) 7  store in (users, example ) 8  (partition p0 values less than 9  (to_date('22-sep-2007','dd-mon-yyyy')) 10  ) 11  / Table created.
Partitioning ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2  from user_tab_partitions 3  where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ---------------------------------- P0  USERS  TIMESTAMP' 2007-09-22 00:00:00'
Partitioning ops$tkyte%ORA11GR1> insert into audit_trail 2  select sysdate+rownum, 'x' 3  from all_users 4  where rownum <= 5 5  / 5 rows created.
Partitioning ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2  from user_tab_partitions 3  where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ---------------------------------- P0  USERS  TIMESTAMP' 2007-09-22 00:00:00' SYS_P66  EXAMPLE  TIMESTAMP' 2007-09-23 00:00:00' SYS_P67  USERS  TIMESTAMP' 2007-09-24 00:00:00' SYS_P68  EXAMPLE  TIMESTAMP' 2007-09-25 00:00:00' SYS_P69  USERS  TIMESTAMP' 2007-09-26 00:00:00' SYS_P70  EXAMPLE  TIMESTAMP' 2007-09-27 00:00:00' 6 rows selected.
Partitioning ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2  from user_tab_partitions 3  where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ------------------------------- P0  USERS  TIMESTAMP' 2007-09-22 00:00:00'
Partitioning ops$tkyte%ORA11GR1> insert into audit_trail values ( add_months(sysdate,12), 'x' ); 1 row created. ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2  from user_tab_partitions 3  where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ------------------------------- P0  USERS  TIMESTAMP' 2007-09-22 00:00:00' SYS_P180  EXAMPLE  TIMESTAMP' 2008-11-10 00:00:00'
Partitioning ops$tkyte%ORA11GR1> insert into audit_trail values ( add_months(sysdate,6), 'x' ); 1 row created. ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2  from user_tab_partitions 3  where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ------------------------------- P0  USERS  TIMESTAMP' 2007-09-22 00:00:00' SYS_P181  EXAMPLE  TIMESTAMP' 2008-05-10 00:00:00' SYS_P180  EXAMPLE  TIMESTAMP' 2008-11-10 00:00:00'
#8 The long awaited  pivot
Pivot ops$tkyte%ORA11GR1> select deptno, 2  sum( decode( job, 'CLERK', sal ) ) clerk, 3  sum( decode( job, 'SALESMAN', sal ) ) salesman, 4  sum( decode( job, 'MANAGER', sal ) ) manager, 5  sum( decode( job, 'ANALYST', sal ) ) analyst, 6  sum( decode( job, 'PRESIDENT', sal ) ) president 7  from emp 8  group by deptno 9  order by deptno 10  / DEPTNO  CLERK  SALESMAN  MANAGER  ANALYST  PRESIDENT ---------- ---------- ---------- ---------- ---------- ---------- 10  1300  2450  5000 20  1900  2975  6000 30  950  5600  2850
Pivot ops$tkyte%ORA11GR1> select * 2  from (select deptno, job, sal 3  from emp ) e 4  pivot ( sum(sal) for job in 5  ( 'CLERK', 'SALESMAN', 'MANAGER', 6  'ANALYST', 'PRESIDENT' ) ) 7  order by deptno 8  / DEPTNO  'CLERK' 'SALESMAN'  'MANAGER'  'ANALYST' 'PRESIDENT' ---------- ---------- ---------- ---------- ---------- ----------- 10  1300  2450  5000 20  1900  2975  6000 30  950  5600  2850
#9 Flashback Data Archive
Flashback Data Archive Total Data Recall ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],User Tablespaces Flashback Data Archive Oracle 11g Database Select * from orders  AS OF ‘Midnight 31-Dec-2004’ Changes Archive Tables
#10 Finer Grained Dependency Tracking
Finer Grained Dependency Tracking ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> create or replace package p1 2  as 3  function f return number; 4  end; 5  / Package created. ops$tkyte%ORA10GR2> create or replace package p2 2  as 3  g_global number := p1.f; 4  end; 5  / Package created.
Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> select object_name, status 2  from user_objects 3  where object_name like 'P_'; OBJECT_NAME  STATUS ------------------------------ ------- P1  VALID P2  VALID
Finer Grained Dependency Tracking ops$tkyte%ORA 10GR2 > create or replace package p1 2  as 3  function f return number; 4  procedure p; 5  end; 6  / Package created. ops$tkyte%ORA 10GR2 > select object_name, status 2  from user_objects 3  where object_name like 'P_'; OBJECT_NAME  STATUS ------------------------------ ------- P1  VALID P2  INVALID
Finer Grained Dependency Tracking ops$tkyte%ORA 11GR1 > create or replace package p1 2  as 3  function f return number; 4  procedure p; 5  end; 6  / Package created. ops$tkyte%ORA 11GR1 > select object_name, status 2  from user_objects 3  where object_name like 'P_'; OBJECT_NAME  STATUS ------------------------------ ------- P1  VALID P2  VALID
Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> create table t ( x int, y int ); Table created. ops$tkyte%ORA10GR2> create or replace procedure p 2  as 3  begin 4  for x in ( select x, y from t ) 5  loop 6  null; 7  end loop; 8  end; 9  / Procedure created. ops$tkyte%ORA10GR2> select status from user_objects where object_name = 'P'; STATUS ------- VALID
Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> alter table t add z int; Table altered. ops$tkyte% ORA10GR2 > select status from user_objects where object_name = 'P'; STATUS ------- INVALID ops$tkyte% ORA11GR1 > select status from user_objects where object_name = 'P'; STATUS ------- VALID
Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> alter procedure p compile; Procedure altered. ops$tkyte%ORA10GR2> alter table t drop column z; Table altered. ops$tkyte% ORA10GR2 > select status from user_objects where object_name = 'P'; STATUS ------- INVALID ops$tkyte% ORA11GR1 > select status from user_objects where object_name = 'P'; STATUS ------- VALID
#11 OLTP Table Compression
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Oracle Advanced Compression
<Insert Picture Here> A Q &
 

More Related Content

What's hot

Fatkulin presentation
Fatkulin presentationFatkulin presentation
Fatkulin presentationEnkitec
 
All on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor SharingAll on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor SharingMohamed Houri
 
A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN Riyaj Shamsudeen
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersConnor McDonald
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Kyle Hailey
 
Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingKyle Hailey
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb Connor McDonald
 
A close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issuesA close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issuesRiyaj Shamsudeen
 
Bind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning NightmareBind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning NightmareSage Computing Services
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoductionRiyaj Shamsudeen
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersRiyaj Shamsudeen
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeJeff Frost
 
Introduction to Parallel Execution
Introduction to Parallel ExecutionIntroduction to Parallel Execution
Introduction to Parallel ExecutionDoug Burns
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoMauro Pagano
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkRiyaj Shamsudeen
 

What's hot (20)

Redo internals ppt
Redo internals pptRedo internals ppt
Redo internals ppt
 
data_all_oracle
data_all_oracledata_all_oracle
data_all_oracle
 
Rac 12c optimization
Rac 12c optimizationRac 12c optimization
Rac 12c optimization
 
Fatkulin presentation
Fatkulin presentationFatkulin presentation
Fatkulin presentation
 
All on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor SharingAll on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor Sharing
 
A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN A deep dive about VIP,HAIP, and SCAN
A deep dive about VIP,HAIP, and SCAN
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 sampling
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
 
A close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issuesA close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issues
 
Bind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning NightmareBind Peeking - The Endless Tuning Nightmare
Bind Peeking - The Endless Tuning Nightmare
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoduction
 
Px execution in rac
Px execution in racPx execution in rac
Px execution in rac
 
MySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB StatusMySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB Status
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
 
Introduction to Parallel Execution
Introduction to Parallel ExecutionIntroduction to Parallel Execution
Introduction to Parallel Execution
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: Network
 

Similar to 11 Things About11g

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$ contentionTanel Poder
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and ArchitectureSidney Chen
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new featuresAlfredo Krieg
 
Schema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cSchema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cuzzal basak
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)akirahiguchi
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseuzzal basak
 
Oracle Diagnostics : Locks and Lock Trees
Oracle Diagnostics :  Locks and Lock TreesOracle Diagnostics :  Locks and Lock Trees
Oracle Diagnostics : Locks and Lock TreesHemant K Chitale
 
Oracle Database 12c Application Development
Oracle Database 12c Application DevelopmentOracle Database 12c Application Development
Oracle Database 12c Application DevelopmentSaurabh K. Gupta
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTanel Poder
 
Thomas+Niewel+ +Oracletuning
Thomas+Niewel+ +OracletuningThomas+Niewel+ +Oracletuning
Thomas+Niewel+ +Oracletuningafa reg
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratopSandesh Rao
 
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Marco Tusa
 

Similar to 11 Things About11g (20)

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
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new features
 
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBAPHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
 
Schema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cSchema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12c
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
 
Oracle Diagnostics : Locks and Lock Trees
Oracle Diagnostics :  Locks and Lock TreesOracle Diagnostics :  Locks and Lock Trees
Oracle Diagnostics : Locks and Lock Trees
 
Oracle Database 12c Application Development
Oracle Database 12c Application DevelopmentOracle Database 12c Application Development
Oracle Database 12c Application Development
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
 
5 Cool Things About SQL
5 Cool Things About SQL5 Cool Things About SQL
5 Cool Things About SQL
 
Thomas+Niewel+ +Oracletuning
Thomas+Niewel+ +OracletuningThomas+Niewel+ +Oracletuning
Thomas+Niewel+ +Oracletuning
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratop
 
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
 

11 Things About11g

  • 1. Top 10, no – make that 11, things about Oracle Database 11g Release 1 Thomas Kyte http://asktom.oracle.com
  • 2.
  • 3.
  • 4.  
  • 5.
  • 6.  
  • 7.  
  • 8. Oracle Database Innovation 30 years of sustained innovation … … continuing with Oracle Database 11g Audit Vault Database Vault Grid Computing Self Managing Database XML Database Oracle Data Guard Real Application Clusters Flashback Query Virtual Private Database Built in Java VM Partitioning Support Built in Messaging Object Relational Support Multimedia Support Data Warehousing Optimizations Parallel Operations Distributed SQL & Transaction Support Cluster and MPP Support Multi-version Read Consistency Client/Server Support Platform Portability Commercial SQL Implementation 1977 2007
  • 9.  
  • 11.
  • 12. Encrypted Tablespaces ops$tkyte%ORA11GR1> create tablespace encrypted 2 datafile '/…/encrypted.dbf' size 10m 3 ENCRYPTION default storage( encrypt ); Tablespace created. ops$tkyte%ORA11GR1> create tablespace clear 2 datafile '/…/clear.dbf' size 10m; Tablespace created.
  • 13. Encrypted Tablespaces ops$tkyte%ORA11GR1> create table t 2 tablespace clear 3 as 4 select * from all_users; Table created. ops$tkyte%ORA11GR1> create index t_idx 2 on t(lower(username)) 3 tablespace clear ; Index created.
  • 14. Encrypted Tablespaces ops$tkyte%ORA11GR1> alter system checkpoint; System altered. $ strings /…/clear.dbf | grep -i ops.tkyte OPS$TKYTE from the table ops$tkyte from the index
  • 15. Encrypted Tablespaces ops$tkyte%ORA11GR1> alter table t move 2 tablespace encrypted ; Table altered. ops$tkyte%ORA11GR1> alter index t_idx rebuild 2 tablespace encrypted ; Index altered.
  • 16. Encrypted Tablespaces ops$tkyte%ORA11GR1> alter system checkpoint; System altered. $ strings /…/encrypted.dbf | grep -i ops.tkyte [This space intentionally left blank]
  • 17. Encrypted Tablespaces ps$tkyte%ORA11GR1> set autotrace traceonly explain ops$tkyte%ORA11GR1> select * from t where lower(username) like 'ops$%'; Execution Plan ------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | ------------------------------------------------------------- | 0 | SELECT STATEMENT | | 2 | 112 | | 1 | TABLE ACCESS BY INDEX ROWID| T | 2 | 112 | |* 2 | INDEX RANGE SCAN | T_IDX | 1 | | ------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access(LOWER(&quot;USERNAME&quot;) LIKE 'ops$%') filter(LOWER(&quot;USERNAME&quot;) LIKE 'ops$%')
  • 18. #2 Cache More Stuff
  • 19.
  • 20. Cache More ops$tkyte%ORA11GR1> /* ops$tkyte%ORA11GR1> drop table t; ops$tkyte%ORA11GR1> create table t as select * from all_objects; ops$tkyte%ORA11GR1> */ ops$tkyte%ORA11GR1> update t set object_type=object_type where rownum=1; 1 row updated.
  • 21. Cache More ops$tkyte%ORA11GR1> set autotrace traceonly ops$tkyte%ORA11GR1> select /*+ result_cache */ 2 owner, 3 object_type, 4 count(*) cnt 5 from t 6 group by owner, object_type 7 order by owner, object_type 8 / 249 rows selected.
  • 22. Cache More Execution Plan -------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 58742 | 1606K| 284 (2)| 00:00:04 | | 1 | RESULT CACHE | 5cwffcum1ajfud1088m1m73f81 | | | | | | 2 | SORT GROUP BY | | 58742 | 1606K| 284 (2)| 00:00:04 | | 3 | TABLE ACCESS FULL| T | 58742 | 1606K| 280 (1)| 00:00:04 | -------------------------------------------------------------------------------------------------- Result Cache Information (identified by operation id): ------------------------------------------------------ 1 - column-count=3; dependencies=(OPS$TKYTE.T); parameters=(nls); name=&quot;select /*+ result_cache */ owner, object_type, count(*) cnt from t group by owner, object_type order by&quot;
  • 23. Cache More Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 1005 consistent gets 0 physical reads 0 redo size 6922 bytes sent via SQL*Net to client 596 bytes received via SQL*Net from client 18 SQL*Net roundtrips to/from client 1 sorts (memory) 0 sorts (disk) 249 rows processed
  • 24. Cache More ops$tkyte%ORA11GR1> / 249 rows selected. Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 0 consistent gets 0 physical reads 0 redo size 6922 bytes sent via SQL*Net to client 596 bytes received via SQL*Net from client 18 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 249 rows processed
  • 25. Cache More ops$tkyte%ORA11GR1> select * from ( 2 select /*+ result_cache */ 3 owner, object_type, count(*) cnt 4 from t 5 group by owner, object_type 6 order by owner, object_type 7 ) 8 where cnt > 100 9 / 38 rows selected.
  • 26. Cache More Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 0 consistent gets 0 physical reads 0 redo size 1516 bytes sent via SQL*Net to client 442 bytes received via SQL*Net from client 4 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 38 rows processed
  • 27. Cache More SQL> create or replace 2 function not_cached 3 ( p_owner in varchar2 ) 4 return number 5 as 6 l_cnt number; 7 begin 8 select count(*) 9 into l_cnt 10 from t 11 where owner = p_owner; 12 dbms_lock.sleep(1); 13 return l_cnt; 14 end; 15 / Function created. SQL> create or replace 2 function cached 3 ( p_owner in varchar2 ) 4 return number 5 result_cache 6 relies_on(T) 7 as 8 l_cnt number; 9 begin 10 select count(*) 11 into l_cnt 12 from t 13 where owner = p_owner; 14 dbms_lock.sleep(1); 15 return l_cnt; 16 end; 17 / Function created.
  • 28. Cache More SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.93 SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.29 SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.07
  • 29. Cache More SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.09 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01
  • 30. Cache More SQL> update t set owner = initcap(owner) where rownum = 1; 1 row updated. SQL> commit; Commit complete. SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.25 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01
  • 31. Cache More SQL> exec dbms_output.put_line( cached( 'SYS' ) ); 29339 PL/SQL procedure successfully completed. Elapsed: 00:00:0 1.21 SQL> exec dbms_output.put_line( cached( 'SYS' ) ); 29339 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.01 SQL> exec dbms_output.put_line( cached( 'SCOTT' ) ); 6 PL/SQL procedure successfully completed. Elapsed: 00:00:0 0.00
  • 32. #3 Standby Just got better
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. Active Data Guard – More than a Standby Simultaneous read and recovery High ROI Automated Disaster and performance protection Use daily in testing and production Recovery mode only Low ROI Manual intensive Disaster protection only Used in disaster only
  • 39.
  • 40. #5 Smaller more secure DMP files
  • 41.
  • 42.
  • 44.
  • 45. Virtual Columns ops$tkyte%ORA11GR1> /* ops$tkyte%ORA11GR1> create table emp ops$tkyte%ORA11GR1> as ops$tkyte%ORA11GR1> select all_objects.*, object_id sal, round(dbms_random.value( 1000, 100000 )) comm ops$tkyte%ORA11GR1> from all_objects ops$tkyte%ORA11GR1> / ops$tkyte%ORA11GR1> ops$tkyte%ORA11GR1> */ ops$tkyte%ORA11GR1> exec dbms_stats.gather_table_stats( user, 'EMP' ) PL/SQL procedure successfully completed.
  • 46. Virtual Columns ops$tkyte%ORA11GR1> select avg( sal+comm ) avg_comp, avg(sal) avg_sal, avg(comm) avg_comm from emp; AVG_COMP AVG_SAL AVG_COMM ---------- ---------- ---------- 85376.9437 34821.6827 50555.261 ops$tkyte%ORA11GR1> select count(case when sal+comm > 85376.9437 then 1 end) above_comp, 2 count(case when sal > 34821.6827 then 1 end) above_sal , 3 count(case when comm > 50555.261 then 1 end) above_comm 4 from emp; ABOVE_COMP ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957 33830 34036
  • 47. Virtual Columns ops$tkyte%ORA11GR1> select * from emp where sal > 34821.6827; -------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 34673 | 3893K| 309 (1)| 00:0 |* 1 | TABLE ACCESS FULL| EMP | 34673 | 3893K| 309 (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957 33830 34036
  • 48. Virtual Columns ops$tkyte%ORA11GR1> select * from emp where comm > 50555.261; -------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 33943 | 3811K| 309 (1)| 00:0 |* 1 | TABLE ACCESS FULL| EMP | 33943 | 3811K| 309 (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957 33830 34036
  • 49. Virtual Columns ops$tkyte%ORA11GR1> select * from emp where sal+comm > 85376.9437; -------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 3398 | 381K| 309 (1)| 00:0 |* 1 | TABLE ACCESS FULL| EMP | 3398 | 381K| 309 (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957 33830 34036
  • 50. Virtual Columns ops$tkyte%ORA11GR1> ALTER TABLE emp ADD (comp AS (sal+comm)); Table altered. ops$tkyte%ORA11GR1> exec dbms_stats.gather_table_stats( user, 'EMP', method_opt=> 'for columns comp ' ); PL/SQL procedure successfully completed.
  • 51. Virtual Columns ops$tkyte%ORA11GR1> select * from emp where sal+comm > 85376.9437; -------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time -------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 33927 | 3975K| 309 (1)| 00:0 |* 1 | TABLE ACCESS FULL| EMP | 33927 | 3975K| 309 (1)| 00:0 -------------------------------------------------------------------- ABOVE_COMP ABOVE_SAL ABOVE_COMM ---------- ---------- ---------- 33957 33830 34036
  • 52. #7 Partitioning just got better
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. Partitioning ops$tkyte%ORA11GR1> create table audit_trail 2 ( ts timestamp, 3 data varchar2(30) 4 ) 5 partition by range(ts) 6 interval (numtodsinterval(1,'day')) 7 store in (users, example ) 8 (partition p0 values less than 9 (to_date('22-sep-2007','dd-mon-yyyy')) 10 ) 11 / Table created.
  • 58. Partitioning ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2 from user_tab_partitions 3 where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ---------------------------------- P0 USERS TIMESTAMP' 2007-09-22 00:00:00'
  • 59. Partitioning ops$tkyte%ORA11GR1> insert into audit_trail 2 select sysdate+rownum, 'x' 3 from all_users 4 where rownum <= 5 5 / 5 rows created.
  • 60. Partitioning ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2 from user_tab_partitions 3 where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ---------------------------------- P0 USERS TIMESTAMP' 2007-09-22 00:00:00' SYS_P66 EXAMPLE TIMESTAMP' 2007-09-23 00:00:00' SYS_P67 USERS TIMESTAMP' 2007-09-24 00:00:00' SYS_P68 EXAMPLE TIMESTAMP' 2007-09-25 00:00:00' SYS_P69 USERS TIMESTAMP' 2007-09-26 00:00:00' SYS_P70 EXAMPLE TIMESTAMP' 2007-09-27 00:00:00' 6 rows selected.
  • 61. Partitioning ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2 from user_tab_partitions 3 where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ------------------------------- P0 USERS TIMESTAMP' 2007-09-22 00:00:00'
  • 62. Partitioning ops$tkyte%ORA11GR1> insert into audit_trail values ( add_months(sysdate,12), 'x' ); 1 row created. ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2 from user_tab_partitions 3 where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ------------------------------- P0 USERS TIMESTAMP' 2007-09-22 00:00:00' SYS_P180 EXAMPLE TIMESTAMP' 2008-11-10 00:00:00'
  • 63. Partitioning ops$tkyte%ORA11GR1> insert into audit_trail values ( add_months(sysdate,6), 'x' ); 1 row created. ops$tkyte%ORA11GR1> select partition_name, tablespace_name, high_value 2 from user_tab_partitions 3 where table_name = 'AUDIT_TRAIL'; PARTITION_ TABLESPACE HIGH_VALUE ---------- ---------- ------------------------------- P0 USERS TIMESTAMP' 2007-09-22 00:00:00' SYS_P181 EXAMPLE TIMESTAMP' 2008-05-10 00:00:00' SYS_P180 EXAMPLE TIMESTAMP' 2008-11-10 00:00:00'
  • 64. #8 The long awaited pivot
  • 65. Pivot ops$tkyte%ORA11GR1> select deptno, 2 sum( decode( job, 'CLERK', sal ) ) clerk, 3 sum( decode( job, 'SALESMAN', sal ) ) salesman, 4 sum( decode( job, 'MANAGER', sal ) ) manager, 5 sum( decode( job, 'ANALYST', sal ) ) analyst, 6 sum( decode( job, 'PRESIDENT', sal ) ) president 7 from emp 8 group by deptno 9 order by deptno 10 / DEPTNO CLERK SALESMAN MANAGER ANALYST PRESIDENT ---------- ---------- ---------- ---------- ---------- ---------- 10 1300 2450 5000 20 1900 2975 6000 30 950 5600 2850
  • 66. Pivot ops$tkyte%ORA11GR1> select * 2 from (select deptno, job, sal 3 from emp ) e 4 pivot ( sum(sal) for job in 5 ( 'CLERK', 'SALESMAN', 'MANAGER', 6 'ANALYST', 'PRESIDENT' ) ) 7 order by deptno 8 / DEPTNO 'CLERK' 'SALESMAN' 'MANAGER' 'ANALYST' 'PRESIDENT' ---------- ---------- ---------- ---------- ---------- ----------- 10 1300 2450 5000 20 1900 2975 6000 30 950 5600 2850
  • 67. #9 Flashback Data Archive
  • 68.
  • 69. #10 Finer Grained Dependency Tracking
  • 70.
  • 71. Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> create or replace package p1 2 as 3 function f return number; 4 end; 5 / Package created. ops$tkyte%ORA10GR2> create or replace package p2 2 as 3 g_global number := p1.f; 4 end; 5 / Package created.
  • 72. Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> select object_name, status 2 from user_objects 3 where object_name like 'P_'; OBJECT_NAME STATUS ------------------------------ ------- P1 VALID P2 VALID
  • 73. Finer Grained Dependency Tracking ops$tkyte%ORA 10GR2 > create or replace package p1 2 as 3 function f return number; 4 procedure p; 5 end; 6 / Package created. ops$tkyte%ORA 10GR2 > select object_name, status 2 from user_objects 3 where object_name like 'P_'; OBJECT_NAME STATUS ------------------------------ ------- P1 VALID P2 INVALID
  • 74. Finer Grained Dependency Tracking ops$tkyte%ORA 11GR1 > create or replace package p1 2 as 3 function f return number; 4 procedure p; 5 end; 6 / Package created. ops$tkyte%ORA 11GR1 > select object_name, status 2 from user_objects 3 where object_name like 'P_'; OBJECT_NAME STATUS ------------------------------ ------- P1 VALID P2 VALID
  • 75. Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> create table t ( x int, y int ); Table created. ops$tkyte%ORA10GR2> create or replace procedure p 2 as 3 begin 4 for x in ( select x, y from t ) 5 loop 6 null; 7 end loop; 8 end; 9 / Procedure created. ops$tkyte%ORA10GR2> select status from user_objects where object_name = 'P'; STATUS ------- VALID
  • 76. Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> alter table t add z int; Table altered. ops$tkyte% ORA10GR2 > select status from user_objects where object_name = 'P'; STATUS ------- INVALID ops$tkyte% ORA11GR1 > select status from user_objects where object_name = 'P'; STATUS ------- VALID
  • 77. Finer Grained Dependency Tracking ops$tkyte%ORA10GR2> alter procedure p compile; Procedure altered. ops$tkyte%ORA10GR2> alter table t drop column z; Table altered. ops$tkyte% ORA10GR2 > select status from user_objects where object_name = 'P'; STATUS ------- INVALID ops$tkyte% ORA11GR1 > select status from user_objects where object_name = 'P'; STATUS ------- VALID
  • 78. #11 OLTP Table Compression
  • 79.
  • 81.  

Editor's Notes

  1. It started with one profound idea In 1970 E.F. Codd wrote the book….the mathematical model that would define the future of RDMBS. He later hooked up with C.J. Date of IBM and Codd and Date would become known as father and grandfather of relational theory. Codd and Date became mythical figures dispensing truths about the purity of various implementations of RDBMs. Had 12 rules of relational databases. Data Model with Structure, Integrity Rules, Operations Data Defined Independently of Programs Set-oriented, Declarative Language
  2. No one thought it could be done It wouldn’t be fast enough, no one would buy it The early adopters came to us. First test outperformed Cullinet’s DBMS – immediately realized this was a break-through, and the company would be worth 100’s of millions The FIRST Commercial SQL RDBMS An Impressive First SQL Non-procedural power (joins, subqueries) for ad hoc access A single language for data definition, control, access Unique Oracle extensions: outer join, CONNECT BY A Simple Server No transactions – like MySQL Limited reliability Portability from the Start – driven by customer requirements from the beginning. Digital PDP-11 operating systems: RSX, RSTS, IAS, Unix DEC VAX (compatibility mode)
  3. As a result of our focus, Oracle leads the industry with a huge number of trend-setting products. Focus on key development areas has lead to a number of industry firsts, from the first commercial relational database, to the first portable tool set and UNIX-based C/S apps, to the first multimedia database architecture. Key Early Differentiators: platform portability, mvrc/row locking, cluster Year Breakthrough 2007 11gR1 Change Assurance 2005 June 10gR2 Database Vault 2004 Grid Computing 2004 January 10gR1 Self managing db 9iR2 XML Database 2002 Oracle Data Guard 2001 Real Application Clusters 2000 Internet File System 1999 8i Internet Enabled Database 1999 Java Support 1999 XML Support 1997 VLDB Support 1997 Messaging Support 1997 Object Relational Support 1997 8.0 Support for Multimedia 1995 Data Warehousing Optimizations 1994 Parallel Operations 1992 Active Business Rules 1992 Distributed Transaction Support 1991 Cluster and MPP Support 1989 Mission Critical OLTP Support 1986 Client/Server Support 1983 Platform Portability 1979 Commercial SQL Implementation * Build our core competency internally, rather than buy product (like IBM or Microsoft). Our development expertise translates to better customer competitiveness
  4. This is designed to be a standalone slide that can be put in other presentations