Вы находитесь на странице: 1из 518

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ble
fe r a
ans
n - t r
a no
Oracle Databaseh a s 11g:
ฺ New
r ) e
Features
m uid
ฺa forGAdministrators
n ฺ co ent
@ ao Stud
z i l le thLab
is Scripts
c e loฺ use
a r to
m e
i l l e ( icens
e loZ l
Marc

D50081GC21
Edition 2.1
September 2010
Authors Copyright © 2009, 2010, Oracle and/or it affiliates. All rights reserved.

Christian Bauwens Disclaimer


Maria Billings
This document contains proprietary information and is protected by copyright and
Mark Fuller other intellectual property laws. You may copy and print this document solely for your
Peter Fusek own use in an Oracle training course. The document may not be modified or altered in
Richard Green any way. Except where your use constitutes "fair use" under copyright law, you may
Christine Jeal not use, share, download, upload, copy, print, display, perform, reproduce, publish,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

license, post, transmit, or distribute this document in whole or in part without the
Donna Keesling express authorization of Oracle.
Deidre Matishak
James Spiller The information contained in this document is subject to change without notice. If you
Jenny Tsai find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
Jean-Francois Verrier warranted to be error-free.
James Womack
Marcie Young Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using


Technical Contributors
and Reviewers
the documentation on behalf of the United States Government, the following notice is
ble
applicable:
fe r a
Maqsood Alam U.S. GOVERNMENT RIGHTS
an s
Kalyan Bitra
John Boyle n - t r
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
o
an
license agreement and/or the applicable U.S. Government contract.
Harald Van Breederode
Sharath Bhujani Trademark Notice s
ha deฺ
Immanuel Chan
Timothy Chien
r )
ฺa Gui
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
Edward Choi m
co ent
may be trademarks of their respective owners.

n ฺ
Jacco Draaijer
Al Flournoy
@ ao Stud
Steve Fogel
z i l le this
Andy Fortunak
c e loฺ use
Gerlinde Frenzen
a r to
Greg Gagnon m e
GP Gongloor
i l l e ( icens Technical Contributors

oZ
Joel Goodman
e l
Hansen Han
l and Reviewers

arc
Tim Shetler
Uwe Hesse Eric Siglin
M Sunil Hingorani Ranbir Singh
Magnus Isaksson Jeff Skochil
Susan Jang George Spears
Martin Jensen Kesavan Srinivasan
Dominique Jeunot Birgitte Taagholt
Pete Jones Glenn Tripp
Yash Kapani Branislav Valny
Pierre Labrousse Anthony Woodell
Richard.W.Lewis
Hakan Lindfors Editors
Russ Lowenthal
Aju Kumar
Kurt Lysy
Amitha Narayan
Isabelle Marchand
Silvia Marrone
Publishers
Heejin Park
Srinivas Putrevu Sujatha Nagendra
Jagannath Poosarla Michael Sebastian Almeida
Surya Rekha Jobi Varghese
----------------------------------------------------------

/home/oracle/solutions/AMM/amm_cleanup.sh:
#!/bin/bash
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

cd /home/oracle/solutions/AMM

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

ble
emctl stop dbconsole
fe r a
sqlplus / as sysdba <<FIN!
ans
n - t r
set echo on
a no
drop user amm cascade;
h a s ฺ
e
drop tablespace tbssga including contents andm ฺar) Guid
datafiles;
ฺ o ent
cand
drop tablespace mytemp including contents
a o n u d
datafiles;
@ S t
shutdown immediate;
z i l le this
c e loฺ use
CREATE SPFILE FROM
a r to
m e
PFILE='/u01/app/oracle/acfsmounts/acfs_db1/dbs/initorcl.ora.bak';

startup; Zill
e ( icens
l o l
a rce
FIN!
M emctl start dbconsole

----------------------------------------------------------

/home/oracle/solutions/AMM/amm_setup.sql:

set echo on

drop tablespace tbssga including contents and datafiles;

create tablespace tbssga datafile '+DATA' size 20m;

drop tablespace mytemp including contents and datafiles;

create temporary tablespace mytemp tempfile '+DATA' size 40m reuse;

drop user amm cascade;

Oracle Database 11g: New Features for Administrators 1


create user amm identified by amm default tablespace tbssga temporary tablespace
mytemp;

grant connect,resource,dba to amm;

select substr(COMPONENT, 0, 10) COMP, CURRENT_SIZE CS, USER_SPECIFIED_SIZE US


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

from v$memory_dynamic_components where CURRENT_SIZE!=0;

connect amm/amm

drop table tabsga purge;

create table tabsga(a number, b number) tablespace tbssga;

begin
for i in 1..100000 loop
ble
insert into tabsga values (i, i);
fe r a
end loop;
end;
ans
/
n - t r
a no
commit;
h a s ฺ
alter table tabsga parallel 64;
ฺ a r) uide
c m )ntasG
onumber
create or replace procedure testpga( psize ฺ
on tude
begin
declare a S
@ ischar(2048)
TYPE nAllotment_tabtyp
z i
IS l l e t
TABLE OFh INDEX BY BINARY_INTEGER;
ฺ e
elo o us
myarray nAllotment_tabtyp;
begin
r c
for i in 1..psizealoop t
( m s e
ille licen
myarray(i) := to_char(i);
Z
end loop;
end; lo
rce
aend;
M/
show errors

select substr(COMPONENT, 0, 10) COMP, CURRENT_SIZE CS, USER_SPECIFIED_SIZE US


from v$memory_dynamic_components where CURRENT_SIZE!=0;

connect / as sysdba

----------------------------------------------------------

/home/oracle/solutions/AMM/change_parameters.sql:
set echo on

alter system set "_PX_use_large_pool" = TRUE SCOPE=SPFILE;

alter system set "_memory_broker_stat_interval" = 5 SCOPE=SPFILE;

alter system set "_memory_management_tracing" = 31 SCOPE=SPFILE;

Oracle Database 11g: New Features for Administrators 2


alter system set "parallel_execution_message_size" = 36864 SCOPE=SPFILE;

alter system set "parallel_max_servers" = 200 SCOPE=SPFILE;

alter system set "parallel_adaptive_multi_user" = FALSE SCOPE=SPFILE;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

alter system set "processes" = 200 SCOPE=SPFILE;

alter system set "pga_aggregate_target" = 0 SCOPE=SPFILE;

alter system set "sga_target" = 0 SCOPE=SPFILE;

alter system set "memory_target" = 280M SCOPE=SPFILE;

----------------------------------------------------------
ble
fe r a
/home/oracle/solutions/AMM/components.sql:
set echo on
ans
n - t r
no
select substr(COMPONENT, 0, 10) COMP, CURRENT_SIZE CS, USER_SPECIFIED_SIZE US
a
from v$memory_dynamic_components where CURRENT_SIZE!=0;
h a s ฺ
a
select substr(COMPONENT, 0, 10), FINAL_SIZE, OPER_TYPE,
ฺ ide
r) uOPER_MODE, status from
v$memory_resize_ops order by START_TIME;
ฺ c om ent G
a on tud
l l e@ is S
----------------------------------------------------------
i
ฺz se th
l o
/home/oracle/solutions/AMM/query1.sql:
set echo on
a rce to u
l e (m en24)se*/ count(*) from (select /*+ parallel(s 24) */ * from
select /*+ PARALLEL(s
tabsga s Z l
i by lia);
group c
l o
a r ce substr(COMPONENT, 0, 10) COMP, CURRENT_SIZE CS, USER_SPECIFIED_SIZE US
select
M from v$memory_dynamic_components where CURRENT_SIZE!=0;
select substr(COMPONENT, 0, 10), FINAL_SIZE, OPER_TYPE, OPER_MODE, status from
v$memory_resize_ops order by START_TIME;

----------------------------------------------------------

/home/oracle/solutions/AMM/query2.sql:
set echo on

select /*+ PARALLEL(s 25) */ count(*) from (select /*+ parallel(s 25) */ * from
tabsga s group by a);

select substr(COMPONENT, 0, 10) COMP, CURRENT_SIZE CS, USER_SPECIFIED_SIZE US


from v$memory_dynamic_components where CURRENT_SIZE!=0;

select substr(COMPONENT, 0, 10), FINAL_SIZE, OPER_TYPE, OPER_MODE, status from


v$memory_resize_ops order by START_TIME;

Oracle Database 11g: New Features for Administrators 3


----------------------------------------------------------

/home/oracle/solutions/AMM/query3.sql:
set echo on

exec testpga(800000);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select substr(COMPONENT, 0, 10) COMP, CURRENT_SIZE CS, USER_SPECIFIED_SIZE US


from v$memory_dynamic_components where CURRENT_SIZE!=0;

select substr(COMPONENT, 0, 10), FINAL_SIZE, OPER_TYPE, OPER_MODE, status from


v$memory_resize_ops order by START_TIME;

----------------------------------------------------------

ble
/home/oracle/solutions/ASM/asm_setup.sh:
fe r a
#!/bin/bash
ans
export ORACLE_SID=orcl
n - t r
a no
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
h a s ฺ
export
ฺ a r) uide
11R6/bin ฺ c om ent G
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X

sqlplus system/oracle_4U <<FIN! @a


on tud
l e i s S
i l h
set echo on
e l oฺz use t
a rc datafile
to '+DATA' size 50M;
m
create tablespace tbsjfv
e
i l l e (purge;
c e ns
l o Z
drop table jfv li
a rce table JFV(c varchar2(500)) tablespace tbsjfv;
create
M insert into jfv
values('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa');

commit;

begin
for i in 1..10 loop
insert into jfv select * from jfv;
end loop;
commit;
end;
/

FIN!

----------------------------------------------------------

/home/oracle/solutions/AST/ast_setup.sh:

Oracle Database 11g: New Features for Administrators 4


#!/bin/bash

cd /home/oracle/solutions/AST

export ORACLE_SID=orcl
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus / as sysdba <<FIN!

set echo on

ble
drop user ast cascade;
fe r a
create user ast identified by ast;
ans
n - t r
grant dba to ast;
a no
alter system flush shared_pool;
h a s ฺ
ฺ a r) uide
--
-- Turn off AUTOTASK ฺ c om ent G
--
a on tud
l l e@ is S
i
ฺz se th
alter system set "_enable_automatic_maintenance"=0;
l o
--
a rce tofo uauto-sqltune
--
l e (m ense
-- Clear out old executions

Zi l lic
e l o
exec dbms_sqltune.reset_tuning_task('SYS_AUTO_SQL_TUNING_TASK');
arc
M --
-- Drop any profiles on AST queries
--

declare
cursor prof_names is
select name from dba_sql_profiles where sql_text like '%AST%';
begin
for prof_rec in prof_names loop
dbms_sqltune.drop_sql_profile(prof_rec.name);
end loop;
end;
/

FIN!

----------------------------------------------------------

/home/oracle/solutions/AST/get_task_report.sh:
#!/bin/bash

Oracle Database 11g: New Features for Administrators 5


cd /home/oracle/solutions/AST

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus / as sysdba <<FIN!

set echo on
set long 1000000000
set longchunksize 1000
ble
fe r a
--
-- Check the execution names
ans
--
n - t r
alter session set nls_date_format = 'MM/DD/YYYY HH24:MI:SS';
a no
select execution_name, status, execution_start
h a s ฺ
where task_name = 'SYS_AUTO_SQL_TUNING_TASK'mฺa
from dba_advisor_executions r) uide
order by execution_start; ฺ c o ent G
variable last_exec varchar2(30); @a
on tud
l e i s S
i l
ฺz se t h
begin
e l o u (dense_rank last order by execution_start)
:last_execa
rc
select max(execution_name)
t o
keep
into
from
l e (m ense
dba_advisor_executions
where Z i l
task_name lic= 'SYS_AUTO_SQL_TUNING_TASK';
end; lo
e
a/rc
M print :last_exec
--
-- Find the object ID for query AST with sql_id by9m5m597zh19
--

variable obj_id number;

begin
select object_id
into :obj_id
from dba_advisor_objects
where task_name = 'SYS_AUTO_SQL_TUNING_TASK' and
execution_name = :last_exec and
type = 'SQL' and
attr1 = 'by9m5m597zh19';
end;
/

print :obj_id

Oracle Database 11g: New Features for Administrators 6


--
-- Get a text report to drill down on this one query
--
set pagesize 0
select dbms_sqltune.report_auto_tuning_task(
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

:last_exec, :last_exec, 'TEXT', 'TYPICAL', 'ALL', :obj_id)


from dual;

FIN!

----------------------------------------------------------

/home/oracle/solutions/AST/interrupt_task.sh:
#!/bin/bash
ble
fe r a
cd /home/oracle/solutions/AST
ans
export ORACLE_SID=orcl
n - t r
a no
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
h a s ฺ
export
ฺ a r) uide
11R6/bin ฺ c om ent G
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X

a on tud
sqlplus / as sysdba <<FIN!
l l e@ is S
i
ฺz se th
connect / as sysdba
l o
a rce to u
set echo on
l e (m ense
-- l
Zi the task
lic
l o
rce
-- Interrupt

M a
--

exec dbms_sqltune.interrupt_tuning_task('SYS_AUTO_SQL_TUNING_TASK');

FIN!

----------------------------------------------------------

/home/oracle/solutions/AST/manual_config.sh:
#!/bin/bash

cd /home/oracle/solutions/AST

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

Oracle Database 11g: New Features for Administrators 7


sqlplus / as sysdba <<FIN!

connect / as sysdba

set echo on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

--
-- Configure the task to run for at most 30 minutes. The value of the
-- TIME_LIMIT parameter determines the total time allowed for a task execution.
--

select parameter_value
from dba_advisor_parameters
where task_name = 'SYS_AUTO_SQL_TUNING_TASK' and
parameter_name = 'TIME_LIMIT';

ble
exec dbms_sqltune.set_tuning_task_parameter( -
fe r a
'SYS_AUTO_SQL_TUNING_TASK', 'TIME_LIMIT', 1800);
ans
select parameter_value
n - t r
from dba_advisor_parameters
a no
where task_name = 'SYS_AUTO_SQL_TUNING_TASK' and
parameter_name = 'TIME_LIMIT';
h a s ฺ
ฺ a r) uide
--
-- Run the task immediately ฺ c om ent G
--
a on tud
l l e@ is S
i
ฺz se th
exec dbms_sqltune.execute_tuning_task('SYS_AUTO_SQL_TUNING_TASK');
l o
FIN!
a rce to u
l e (m ense
Zi l lic
----------------------------------------------------------
l o
rce
a/home/oracle/solutions/AST/run_ast.sh:
M #!/bin/bash
cd /home/oracle/solutions/AST

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

date

sqlplus / as sysdba <<FIN!

set echo on

exec dbms_workload_repository.create_snapshot;

variable window varchar2(20);

Oracle Database 11g: New Features for Administrators 8


begin
select upper(to_char(sysdate,'fmday'))||'_WINDOW' into :window from dual;
end;
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

print window;

--
-- Open the corresponding maintenance window, but with other clients disabled
--

alter system set "_enable_automatic_maintenance"=1


/

exec dbms_auto_task_admin.disable( -
ble
'auto optimizer stats collection', null, :window);
fe r a
exec dbms_auto_task_admin.disable( -
ans
'auto space advisor', null, :window);
n - t r
o
exec dbms_scheduler.open_window(:window, null, true);
s an
r ) ha deฺ
is ฺa ui
--
-- Close the maintenance window when sqltune m
co ent
done
G
--
n ฺ
exec dbms_lock.sleep(60); @ ao Stud
z i l le this
declare
c e loฺ use
running number;
a r to
begin
m e
loop Zill
e ( icens
l o l
e
select count(*)

Marc into running


from dba_advisor_executions
where task_name = 'SYS_AUTO_SQL_TUNING_TASK' and
status = 'EXECUTING';

if (running = 0) then
exit;
end if;

dbms_lock.sleep(60);
end loop;

dbms_scheduler.close_window(:window);

end;
/

alter system set "_enable_automatic_maintenance"=0


/

--
-- Re-enable the other guys so they look like they are enabled in EM.

Oracle Database 11g: New Features for Administrators 9


-- Still they will be disabled because we have set the underscore.
--

exec dbms_auto_task_admin.enable( -
'auto optimizer stats collection', null, :window);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

exec dbms_auto_task_admin.enable( -
'auto space advisor', null, :window);

FIN!

date

----------------------------------------------------------
ble
fe r a
/home/oracle/solutions/AST/run_workload_stream.sh:
#!/bin/bash
ans
n - t r
cd /home/oracle/solutions/AST
a no
export ORACLE_SID=orcl
h a s ฺ
ฺ a r) uide
ฺ c om ent G
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
a on tud
l l e@ is S
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin i
ฺz se th
l o
date
a rce to u
(m
<<FIN!ns
e
sqlplus ast/ast
i l l e e
l o Zoff lic
ce
set echo
a r
M select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 10


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 11


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 12


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 13


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 14


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
el
FIN! oZ l
r c
adate
M
sqlplus ast/ast <<FIN2!

set echo off

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 15


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 16


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 17


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 18


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

Oracle Database 11g: New Features for Administrators 19


select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)


from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ble
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
fe r a
group by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ans
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n - t r
o
an
group by c.cust_id;
s
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
ha deฺ
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id; r )
ฺa Gui
m
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
co ent

from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
n
group by c.cust_id;
@ ao Stud
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
z i l le this
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
c e loฺ use
r to
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
a
m e
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
l e ( icens
group by c.cust_id;
i l
oZ l
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
e l
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2

Marcgroup by c.cust_id;
select /*+ USE_NL(s c) FULL(s) FULL(c) AST */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

FIN2!

date

----------------------------------------------------------

/home/oracle/solutions/AST/wrkl11g_jfv.sh:
#!/bin/ksh

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

export
PATH=/u01/app/oracle/product/11.1.0/db_1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

Oracle Database 11g: New Features for Administrators 20


sqlplus sys/oracle as sysdba <<FIN!

-- as sysdba flush the shared pool


ALTER system flush buffer_cache;
ALTER system flush shared_pool;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- connect as dwh_test
CONNECT apps/apps;
set echo on;
spool /tmp/dwh_test.log;
-- Generated on Thu Sep 18 20:38:59 2003
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY:MON-DD:HH24:MI:SS';
SET LINES 80;
set wrap on
ble
SET PAGES 0;
fe r a
rem SET TRIMS ON;
SET HEADING OFF;
ans
SELECT '@Start', sysdate from dual;
n - t r
o
an
rem SET TERMOUT ON;
rem set ECHO OFF;
SET ECHO ON; s
ha deฺ
rem SET FEEDBACK OFF; r )
ฺa Gui
m
rem alter session set tracefile_identifier='noprof';
co ent
rem alter session set sql_trace=true;
n ฺ
alter system set cursor_sharing=exact;
set autotrace traceonly statistics; @ ao Stud
z i l le this
PROMPT @Statement 1
c e loฺ use
r to
execute dbms_application_info.set_module('DWH_TEST','1');
a
m e
SET TIMING ON;
i l l e ( icens
Z
SELECT DISTINCT
l o l
rce
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id

MaFROM lu_pg_featurevalue_15 t1,


lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 1485)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 15 Ticks

PROMPT @Statement 2
rem #execute dbms_application_info.set_module('DWH_TEST','2');

SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM

Oracle Database 11g: New Features for Administrators 21


lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 12425)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 0 Ticks

PROMPT @Statement 3
ble
rem #execute dbms_application_info.set_module('DWH_TEST','3');
fe r a
SELECT DISTINCT
ans
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
n - t r
o
an
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins */ m
co ent

((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
n
)
/* Attribute Filters */ @ ao Stud
z i l le this
AND ((t1.pg_featurevalue_15_id = 49620)

c e loฺ use
AND (t2.elementrange_id = 3091)
)
a r to
/
m e
l e ( icens
PROMPT @1 Results in 16 Ticks
i l
oZ
el
l
r c
aPROMPT @Statement 4
M rem #execute dbms_application_info.set_module('DWH_TEST','4');
SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 5454)
AND (t2.elementgroup_id = 6624)
)
/
PROMPT @1 Results in 0 Ticks

Oracle Database 11g: New Features for Administrators 22


PROMPT @Statement 5
rem #execute dbms_application_info.set_module('DWH_TEST','5');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 16003)
AND (t2.elementgroup_id = 6624)
)
ble
/
fe r a
PROMPT @1 Results in 15 Ticks
ans
n - t r
a no
PROMPT @Statement 6
h a
rem #execute dbms_application_info.set_module('DWH_TEST','6'); s ฺ
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */ mฺa
r) uide
ฺ c o ent G
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
a on tud
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

l e i s S
@ pg_featurevalue_08_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
i l t h
ฺz se pg_featurevalue_01_id,
'B' || t2.pg_featurevalue_08_id
l o
'B' || t2.pg_featurevalue_01_id
e u
a rc
'r' || t5.elementrange_id
t o price_eur_id,

l e (m ense period_id,
'B' || t2.productgroup_id
'G' || t6.elementgroup_id
productgroup_id,

Zi l lic
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
l o
rce
salesvalueeur

MaFROM lu_item_293 t2,


lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 23


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t4.elementrange_id IN (3091,3092))


AND (t5.elementrange_id IN (8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
ans
t4.elementrange_id,
n - t r
o
an
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id, s
ha deฺ
t2.productgroup_id, r )
ฺa Gui
t6.elementgroup_id m
co ent
/
n ฺ
PROMPT @69 Results in 12078 Ticks
@ ao Stud
z i l le this
PROMPT @Statement 7 ce
loฺ use
a r to
m e
rem #execute dbms_application_info.set_module('DWH_TEST','7');
( ens
ille liINDEX(t1)
SELECT /*ZORDERED c USE_HASH(t1) */
l o
rce'B'
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
a || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
M 'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 24


AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8686,8687,8688,8689,8690,8691,8692,8693))
ble
AND (t6.elementgroup_id = 14659)
fe r a
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ans
ElementGroup Filters */
n - t r
o
an
)
/* Fact Filters */
AND (t1.project_type_id = '1' s
ha deฺ
) r )
ฺa Gui
GROUP BY m
co ent
t2.pg_featurevalue_13_id,
n ฺ
t2.pg_featurevalue_02_id,
t4.elementrange_id, @ ao Stud
t2.pg_featurevalue_08_id,
z i l le this
t2.pg_featurevalue_01_id,
c e loฺ use
t5.elementrange_id,
a r to
m
t2.productgroup_id,
e
l e ( icens
t6.elementgroup_id
i l
oZ l
/
e l
PROMPT @160 Results in 14344 Ticks

Marc
PROMPT @Statement 8
rem #execute dbms_application_info.set_module('DWH_TEST','8');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id

Oracle Database 11g: New Features for Administrators 25


/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
ble
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
fe r a
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
ans
AND (t1.period_id IN
n - t r
o
an
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
) s
ha deฺ
/* Fact Filters */ r )
ฺa Gui
AND (t1.project_type_id = '1' m
co ent
)
n ฺ
GROUP BY
t2.pg_featurevalue_05_id, @ ao Stud
t2.pg_featurevalue_08_id,
z i l le this
t3.elementrange_id,
c e loฺ use
t2.productgroup_id,
a r to
m
t4.elementgroup_id
e
/
i l l e ( icens
oZ l
PROMPT @46 Results in 24281 Ticks
e l
arc
M PROMPT @Statement 9
rem #execute dbms_application_info.set_module('DWH_TEST','9');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,

Oracle Database 11g: New Features for Administrators 26


lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
ble
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
fe r a
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
ans
AND (t2.pg_featurevalue_02_id IN (4165,4166))
n - t r
o
an
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
s
ha deฺ
AND (t5.elementrange_id IN (8680,8681,8682,8683,8684,8685,8686))
AND (t6.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t2.pg_featurevalue_13_id,
i l
oZ l
t2.pg_featurevalue_02_id,
e l
t4.elementrange_id,

Marc t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @179 Results in 12500 Ticks

PROMPT @Statement 10
rem #execute dbms_application_info.set_module('DWH_TEST','10');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_18_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 27


lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_18_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95)))
n - t r
o
an
AND (t3.elementgroup_id IN (8902,8903))
AND (t4.elementrange_id IN
s
ha deฺ
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
r )
ฺa Gui
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
m
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
co ent
AND (t5.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t3.elementgroup_id,

Marc t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @40 Results in 1390 Ticks

PROMPT @Statement 11
rem #execute dbms_application_info.set_module('DWH_TEST','11');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur

Oracle Database 11g: New Features for Administrators 28


FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
ble
AND (t1.period_id = t6.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_08_id IN (716,717)) m
co ent

AND (t2.pg_featurevalue_02_id IN (4165,4166))
n
AND (t2.pg_featurevalue_13_id = 5424)
@
AND (t4.elementrange_id IN (3091,3092)) ao Stud
z i l le this
AND (t5.elementrange_id IN (8671,8672,8673,8674,8675,8676,8679))

c e loฺ use
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @220 Results in 12297 Ticks

PROMPT @Statement 12
rem #execute dbms_application_info.set_module('DWH_TEST','12');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 29


'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ans
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
) s
ha deฺ
/* Attribute Filters */ r )
ฺa Gui
AND ((t2.productgroup_id = 15520) m
co ent

AND (t1.productgroup_id = 15520) /* Push Down Filters */
n
AND (t2.pg_featurevalue_01_id IN
@ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
z i l le this
c e loฺ use
AND (t4.elementrange_id IN (3091,3092,3093,3107))
r
AND (t5.elementrange_id IN
a to
m e
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
l e ( icens
AND (t6.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @281 Results in 39812 Ticks

PROMPT @Statement 13
rem #execute dbms_application_info.set_module('DWH_TEST','13');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 30


'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ans
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
) s
ha deฺ
/* Attribute Filters */ r )
ฺa Gui
AND ((t2.productgroup_id = 15520) m
co ent

AND (t1.productgroup_id = 15520) /* Push Down Filters */
n
AND (t2.pg_featurevalue_01_id IN
@ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
z i l le this
c e loฺ use
AND (t4.elementrange_id IN (3091,3092,3093,3107))
r
AND (t5.elementrange_id IN
a to
m e
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
l e ( icens
AND (t6.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @319 Results in 40938 Ticks

PROMPT @Statement 14
rem #execute dbms_application_info.set_module('DWH_TEST','14');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 31


'G' || t5.elementgroup_id pg_featurevalue_01_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_elementrange_rel t6
WHERE
/* Attribute Joins */
ble
((t1.item_id = t2.item_id
fe r a
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ans
/* Customizing End */
n - t r
o
an
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

AND (t2.pg_featurevalue_01_id = t5.value_id) s


AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
ha deฺ
r )
ฺa Gui
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
AND (t1.period_id = t7.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND (t2.pg_featurevalue_05_id IN (5446,5447))
r to
AND (t4.elementrange_id = 3091)
a
m e
AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))
l e ( icens
AND (t6.elementrange_id IN
i l
oZ l
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
e l
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689

Marc,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t4.elementrange_id,
t5.elementgroup_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @135 Results in 49031 Ticks

PROMPT @Statement 15

Oracle Database 11g: New Features for Administrators 32


rem #execute dbms_application_info.set_module('DWH_TEST','15');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
ble
lu_elementrange_rel t5
fe r a
WHERE
/* Attribute Joins */
ans
((t1.item_id = t2.item_id
n - t r
o
an
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ s
ha deฺ
r )
ฺa Gui
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
m
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
co ent

AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
n
AND (t1.period_id = t6.value_id)
) @ ao Stud
/* Attribute Filters */
z i l le this
c e loฺ use
AND ((t2.productgroup_id = 15520)
r to
AND (t1.productgroup_id = 15520) /* Push Down Filters */
a
m e
AND (t2.pg_featurevalue_01_id IN
l e ( icens
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
i l
oZ l
97,3891,71,76,89,92,95))
e l
AND (t4.elementrange_id IN (3091,3092,3093,3107))

Marc AND (t5.elementrange_id IN (8656,8657))


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @5 Results in 9625 Ticks

PROMPT @Statement 16
rem #execute dbms_application_info.set_module('DWH_TEST','16');

Oracle Database 11g: New Features for Administrators 33


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,


'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t6,
lu_elementrange_rel t5
ans
WHERE
n - t r
o
an
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */ s
ha deฺ
AND t1.productgroup_id = t2.productgroup_id) r )
ฺa Gui
/* Customizing End */ m
co ent

AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
n
@ ao Stud
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
z
AND (t1.period_id = t6.value_id)i l le this
)
c e loฺ use
/* Attribute Filters */
a r to
m e
AND ((t2.productgroup_id = 15520)
l e ( icens
AND (t1.productgroup_id = 15520) /* Push Down Filters */
i l
oZ l
AND (t2.pg_featurevalue_01_id IN
e l
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

Marc97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8664,8665,8666,8667,8668,8669,8670,8671))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,

Oracle Database 11g: New Features for Administrators 34


t6.elementgroup_id
/
PROMPT @140 Results in 14219 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 17
rem #execute dbms_application_info.set_module('DWH_TEST','17');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ble
salesvalueeur
fe r a
FROM
lu_item_293 t2,
ans
lu_pg_featurevalue_15 t3,
n - t r
o
an
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6, s
ha deฺ
lu_elementrange_rel t5 r )
ฺa Gui
WHERE m
co ent
/* Attribute Joins */
n ฺ
((t1.item_id = t2.item_id
/* Customizing Begin */ @ ao Stud
AND
z i l le this
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
c e loฺ use
r to
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
a
m e
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
l e ( icens
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
i l
oZ l
AND (t1.period_id = t6.value_id)
e l)

Marc/* Attribute Filters */


AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,

Oracle Database 11g: New Features for Administrators 35


t6.elementgroup_id
/
PROMPT @353 Results in 41250 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 18
rem #execute dbms_application_info.set_module('DWH_TEST','18');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
ble
'B' || t2.productgroup_id productgroup_id,
fe r a
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ans
salesvalueeur
n - t r
o
an
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3, s
ha deฺ
lu_elementrange_rel t4, r )
ฺa Gui
fact_pd_out_itm_293 t1, m
co ent
lu_elementgroup_rel t6,
n ฺ
lu_elementrange_rel t5
WHERE @ ao Stud
/* Attribute Joins */
z i l le this
c e loฺ use
((t1.item_id = t2.item_id
/* Customizing Begin */
a r to
AND
m e
t1.productgroup_id = t2.productgroup_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
e l
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)

Marc AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)


AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8658,8659,8660,8661,8662,8663,8664))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 36


GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @3 Results in 12578 Ticks

PROMPT @Statement 19
rem #execute dbms_application_info.set_module('DWH_TEST','19');
ble
fe r a
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'r' || t4.elementrange_id pg_featurevalue_15_id,
ans
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
n - t r
o
an
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id, s
ha deฺ
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur m
co ent
FROM
n ฺ
lu_item_293 t2,
lu_pg_featurevalue_15 t3, @ ao Stud
lu_elementrange_rel t4,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t6,
a to
m
lu_elementrange_rel t5
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)

Oracle Database 11g: New Features for Administrators 37


/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @118 Results in 41453 Ticks

PROMPT @Statement 20
rem #execute dbms_application_info.set_module('DWH_TEST','20');
ble
fe r a
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
ans
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
n - t r
o
an
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id, s
ha deฺ
'r' || t5.elementrange_id price_eur_id, r )
ฺa Gui
'B' || t2.productgroup_id productgroup_id, m
co ent
'G' || t6.elementgroup_id period_id,
n ฺ
salesvalueeur @ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM
z i l le this
lu_item_293 t2,
c e loฺ use
r
lu_pg_featurevalue_15 t3,
a to
m
lu_elementrange_rel t4,
e
l e ( icens
fact_pd_out_itm_293 t1,
i l
oZ l
lu_elementgroup_rel t6,
e l
lu_elementrange_rel t5

MarcWHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8656,8657))

Oracle Database 11g: New Features for Administrators 38


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.project_type_id = '1'


)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @0 Results in 4594 Ticks
ans
n - t r
a no
PROMPT @Statement 21
h a s ฺ
a
rem #execute dbms_application_info.set_module('DWH_TEST','21');
ฺ r) uide
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ c om ent G
a on tud
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id
l e i s S
@ pg_featurevalue_08_id,
pg_featurevalue_15_id,
i l
ฺz price_eur_id,
'B' || t2.pg_featurevalue_08_id
t h
l
'r' || t3.elementrange_id
e o u s e
a rc
'B' || t2.productgroup_id
t o productgroup_id,

l e (m ense
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
Zi l
salesvalueeur lic
FROM lo
a rcelu_item_293 t2,
M fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671

Oracle Database 11g: New Features for Administrators 39


,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
ble
t4.elementgroup_id
fe r a
/
PROMPT @171 Results in 68984 Ticks
ans
n - t r
a no
PROMPT @Statement 22
h a s ฺ
a
rem #execute dbms_application_info.set_module('DWH_TEST','22');
ฺ r) uide
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ c om ent G
a on tud
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id
l e i s S
@ pg_featurevalue_08_id,
pg_featurevalue_15_id,
i l
ฺz price_eur_id,
'B' || t2.pg_featurevalue_08_id
t h
l
'r' || t3.elementrange_id
e o u s e
a rc
'B' || t2.productgroup_id
t o productgroup_id,

l e (m ense
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
Zi l
salesvalueeur lic
FROM lo
a rcelu_item_293 t2,
M fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN

Oracle Database 11g: New Features for Administrators 40


(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
)
)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ble
ElementGroup Filters */
fe r a
)
/* Fact Filters */
ans
AND (t1.project_type_id = '1'
n - t r
)
a no
GROUP BY
t2.pg_featurevalue_02_id,
h a s ฺ
t2.pg_featurevalue_15_id,
ฺ a r) uide
t2.pg_featurevalue_08_id,
t3.elementrange_id, ฺ c om ent G
t2.productgroup_id,
a on tud
t4.elementgroup_id
l l e@ is S
/ i
ฺz se th
l o
PROMPT @149 Results in 70531 Ticks

a rce to u
l e (m ense
l
Zi dbms_application_info.set_module('DWH_TEST','23');
PROMPT @Statement li23c
l o
ce
rem #execute
a r
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

Oracle Database 11g: New Features for Administrators 41


AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
ble
/* Fact Filters */
fe r a
AND (t1.project_type_id = '1'
)
ans
GROUP BY
n - t r
t2.pg_featurevalue_13_id,
a no
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
h a s ฺ
t3.elementrange_id,
ฺ a r) uide
t2.productgroup_id,
t4.elementgroup_id ฺ c om ent G
/
a on tud
PROMPT @1 Results in 4531 Ticks
l l e@ is S
i
ฺz se th
l o
a rce to u
rem #execute e
l (m ense
PROMPT @Statement 24
dbms_application_info.set_module('DWH_TEST','24');
Zi l lic
SELECTlo/* ORDERED INDEX(t1) USE_HASH(t1) */
a rce'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
M 'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 42


AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_15_id = 1484)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.pg_featurevalue_02_id IN (4165,4166))


AND (t2.pg_featurevalue_05_id = 5447)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ble
)
fe r a
/* Fact Filters */
AND (t1.project_type_id = '1'
ans
)
n - t r
GROUP BY
a no
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,
h a s ฺ
t2.pg_featurevalue_15_id,
ฺ a r) uide
t3.elementrange_id,
t2.productgroup_id, ฺ c om ent G
t4.elementgroup_id
a on tud
/
l l e@ is S
PROMPT @16 Results in 532 Ticks i
ฺz se th
l o
a rce to u
l
PROMPT @Statemente (m25 ense
rem #execute l
Zi dbms_application_info.set_module('DWH_TEST','25');
lic
l o
a rce'B'/*||ORDERED
SELECT INDEX(t1) USE_HASH(t1) */
M t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 43


AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_05_id = 5447)
AND (t4.elementrange_id = 3091)
AND (t5.elementrange_id IN
ble
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
fe r a
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
ans
AND (t6.elementgroup_id = 14659)
n - t r
o
an
AND (t1.period_id IN

ElementGroup Filters */ s
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ha deฺ
) r )
ฺa Gui
/* Fact Filters */ m
co ent
AND (t1.project_type_id = '1'
n ฺ
)
GROUP BY @ ao Stud
t2.pg_featurevalue_05_id,
z i l le this
t2.pg_featurevalue_02_id,
c e loฺ use
t4.elementrange_id,
a r to
m
t2.pg_featurevalue_08_id,
e
l e ( icens
t5.elementrange_id,
i l
oZ l
t2.productgroup_id,
e l
t6.elementgroup_id

Marc/
PROMPT @77 Results in 8219 Ticks

PROMPT @Statement 26
rem #execute dbms_application_info.set_module('DWH_TEST','26');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,

Oracle Database 11g: New Features for Administrators 44


lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ble
97,3891,71,76,89,92,95))
fe r a
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
ans
AND (t3.elementgroup_id IN (1952,1953))
n - t r
o
an
AND (t4.elementrange_id IN
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659) s
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t3.elementgroup_id,
e
l e ( icens
t2.pg_featurevalue_15_id,
i l
oZ l
t2.pg_featurevalue_08_id,
e l
t2.pg_featurevalue_01_id,

Marc t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @20 Results in 15000 Ticks

PROMPT @Statement 27
rem #execute dbms_application_info.set_module('DWH_TEST','27');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 45


fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
ble
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
fe r a
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
ans
AND (t2.pg_featurevalue_13_id = 5424)
n - t r
o
an
AND (t3.elementrange_id IN

,8696,8697,8698,8699)) s
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695
ha deฺ
AND (t4.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t2.pg_featurevalue_13_id,
i l
oZ l
t2.pg_featurevalue_08_id,
e l
t2.pg_featurevalue_01_id,

Marc t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @313 Results in 42485 Ticks

PROMPT @Statement 28
rem #execute dbms_application_info.set_module('DWH_TEST','28');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,

Oracle Database 11g: New Features for Administrators 46


lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND t1.productgroup_id = t2.productgroup_id)


/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ble
97,3891,71,76,89,92,95))
fe r a
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
ans
AND (t3.elementrange_id IN
n - t r
o
an
(8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN s
ha deฺ
r )
ฺa Gui
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ m
co ent
)
n ฺ
/* Fact Filters */
AND (t1.project_type_id = '1' @ ao Stud
)
z i l le this
GROUP BY
c e loฺ use
r
t2.pg_featurevalue_05_id,
a to
m
t2.pg_featurevalue_15_id,
e
l e ( icens
t2.pg_featurevalue_01_id,
i l
oZ l
t3.elementrange_id,
e l
t2.productgroup_id,

Marc/
t4.elementgroup_id

PROMPT @11 Results in 12641 Ticks

PROMPT @Statement 29
rem #execute dbms_application_info.set_module('DWH_TEST','29');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,

Oracle Database 11g: New Features for Administrators 47


lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ble
AND (t2.pg_featurevalue_08_id IN (716,717))
fe r a
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN
ans
n
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673- t r
o
an
,8674,8675,8676,8679))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN s
ha deฺ
r )
ฺa Gui
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ m
co ent
)
n ฺ
/* Fact Filters */
AND (t1.project_type_id = '1' @ ao Stud
)
z i l le this
GROUP BY
c e loฺ use
r
t2.pg_featurevalue_13_id,
a to
m
t2.pg_featurevalue_08_id,
e
l e ( icens
t2.pg_featurevalue_01_id,
i l
oZ l
t3.elementrange_id,
e l
t2.productgroup_id,

Marc/
t4.elementgroup_id

PROMPT @318 Results in 42875 Ticks

PROMPT @Statement 30
rem #execute dbms_application_info.set_module('DWH_TEST','30');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3

Oracle Database 11g: New Features for Administrators 48


WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)


AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484))
ble
AND (t2.pg_featurevalue_05_id IN (5446,5447))
fe r a
AND (t3.elementrange_id IN
(8671,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686))
ans
AND (t4.elementgroup_id = 14659)
n - t r
o
an
AND (t1.period_id IN

ElementGroup Filters */ s
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ha deฺ
) r )
ฺa Gui
/* Fact Filters */ m
co ent
AND (t1.project_type_id = '1'
n ฺ
)
GROUP BY @ ao Stud
t2.pg_featurevalue_05_id,
z i l le this
t2.pg_featurevalue_15_id,
c e loฺ use
r
t2.pg_featurevalue_01_id,
a to
m
t3.elementrange_id,
e
l e ( icens
t2.productgroup_id,
i l
oZ l
t4.elementgroup_id
/
e l
MarcPROMPT @72 Results in 11703 Ticks

PROMPT @Statement 31
rem #execute dbms_application_info.set_module('DWH_TEST','31');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4

Oracle Database 11g: New Features for Administrators 49


WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.pg_featurevalue_13_id = t3.value_id)


AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ble
AND (t2.pg_featurevalue_08_id = 717)
fe r a
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
ans
AND (t4.elementrange_id IN
n - t r
o
an
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN s
ha deฺ
r )
ฺa Gui
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ m
co ent
)
n ฺ
/* Fact Filters */
AND (t1.project_type_id = '1' @ ao Stud
)
z i l le this
GROUP BY
c e loฺ use
t3.elementgroup_id,
a r to
m
t2.pg_featurevalue_15_id,
e
l e ( icens
t2.pg_featurevalue_08_id,
i l
oZ l
t2.pg_featurevalue_01_id,
e l
t4.elementrange_id,

Marc t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @103 Results in 14610 Ticks

PROMPT @Statement 32
rem #execute dbms_application_info.set_module('DWH_TEST','32');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,

Oracle Database 11g: New Features for Administrators 50


lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ble
AND (t2.pg_featurevalue_15_id IN (1481,1484))
fe r a
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
ans
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671))
n - t r
o
an
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
s
ha deฺ
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ r )
ฺa Gui
) m
co ent
/* Fact Filters */
n ฺ
AND (t1.project_type_id = '1'
) @ ao Stud
GROUP BY
z i l le this
t2.pg_featurevalue_05_id,
c e loฺ use
r
t2.pg_featurevalue_15_id,
a to
m
t2.pg_featurevalue_01_id,
e
l e ( icens
t3.elementrange_id,
i l
oZ l
t2.productgroup_id,
e l
t4.elementgroup_id

Marc/
PROMPT @299 Results in 11828 Ticks

PROMPT @Statement 33
rem #execute dbms_application_info.set_module('DWH_TEST','33');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,

Oracle Database 11g: New Features for Administrators 51


lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ble
97,3891,71,76,89,92,95))
fe r a
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
ans
AND (t3.elementgroup_id IN (1952,1953))
n - t r
o
an
AND (t4.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t5.elementgroup_id = 14659) s
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t3.elementgroup_id,
e
l e ( icens
t2.pg_featurevalue_15_id,
i l
oZ l
t2.pg_featurevalue_08_id,
e l
t2.pg_featurevalue_01_id,

Marc t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @222 Results in 14875 Ticks

PROMPT @Statement 34
rem #execute dbms_application_info.set_module('DWH_TEST','34');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 52


lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953)) s
ha deฺ
AND (t4.elementrange_id IN r )
ฺa Gui
m
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
co ent
AND (t5.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t3.elementgroup_id,

Marc t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @127 Results in 15234 Ticks

PROMPT @Statement 35
rem #execute dbms_application_info.set_module('DWH_TEST','35');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

Oracle Database 11g: New Features for Administrators 53


FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN (8656,8657)) s
ha deฺ
AND (t4.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t2.pg_featurevalue_05_id,
i l
oZ l
t2.pg_featurevalue_15_id,
e l
t2.pg_featurevalue_01_id,

Marc t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 2281 Ticks

PROMPT @Statement 36
rem #execute dbms_application_info.set_module('DWH_TEST','36');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t5.elementgroup_id pg_featurevalue_31_id,
'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,

Oracle Database 11g: New Features for Administrators 54


lu_elementgroup_rel t5,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_elementrange_rel t6
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t2.pg_featurevalue_31_id = t5.value_id)
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
AND (t1.period_id = t7.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_09_id IN (5484,5485))
AND (t5.elementgroup_id = 8597)
AND (t4.elementrange_id = 3106) s
ha deฺ
AND (t6.elementrange_id IN r )
ฺa Gui
m
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
co ent

,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
n
AND (t7.elementgroup_id = 14659) @ ao Stud
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t4.elementrange_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @13 Results in 562 Ticks

PROMPT @Statement 37
rem #execute dbms_application_info.set_module('DWH_TEST','37');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 55


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_08_id = 717) m
co ent

AND (t2.pg_featurevalue_15_id IN (12425,1485))
n
AND (t3.elementgroup_id IN (1952,1953))
@
AND (t4.elementrange_id IN (8656,8657)) ao Stud
z
AND (t5.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @1 Results in 3469 Ticks

PROMPT @Statement 38
rem #execute dbms_application_info.set_module('DWH_TEST','38');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'G' || t3.elementgroup_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 56


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_01_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementgroup_id IN (1959,1960,1961,1962,8574)) s
ha deฺ
AND (t4.elementrange_id IN r )
ฺa Gui
m
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
co ent

,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
n
AND (t5.elementgroup_id = 14659) @ ao Stud
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t2.pg_featurevalue_13_id,
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @172 Results in 76250 Ticks

PROMPT @Statement 39
rem #execute dbms_application_info.set_module('DWH_TEST','39');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_47_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 57


lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_47_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND NOT ((t2.pg_featurevalue_15_id IN (1474,1481,1483,1484)
OR
ans
/* ElementGroup Subselect */
n - t r
o
an
(
t2.pg_featurevalue_15_id IN
(SELECT g1.value_id s
ha deฺ
FROM lu_elementgroup_rel g1 r )
ฺa Gui
WHERE m
co ent
/* ElementGroup Filters */
n ฺ
) @ ao Stud
(g1.elementgroup_id = 8507)

)
z i l le this
OR
c e loฺ use
r to
/* ElementRange Subselect */
a
m e
t2.pg_featurevalue_15_id IN

i l l e ( icens
(SELECT r1.pg_featurevalue_15_id

oZ l
FROM lu_pg_featurevalue_15 r1,
e l lu_elementrange_rel r2

Marc WHERE
/* Feature Filter */
(r1.pg_feature_15_id = 977)
/* Attribute Join */
AND (r1.pg_featurevalue_15_num BETWEEN r2.lbound AND r2.ubound)
/* ElementRange Filter */
AND (r2.elementrange_id = 5783)
)
)
)
AND (t3.elementgroup_id = 6624)
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'

Oracle Database 11g: New Features for Administrators 58


)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
PROMPT @8 Results in 2781 Ticks

PROMPT @Statement 40
rem #execute dbms_application_info.set_module('DWH_TEST','40');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
ble
'r' || t3.elementrange_id price_eur_id,
fe r a
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
ans
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
n - t r
o
an
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1, s
ha deฺ
lu_elementgroup_rel t4, r )
ฺa Gui
lu_elementrange_rel t3 m
co ent
WHERE
n ฺ
/* Attribute Joins */
((t1.item_id = t2.item_id @ ao Stud
/* Customizing Begin */
z i l le this
AND
loฺ use
t1.productgroup_id = t2.productgroup_id)
c e
/* Customizing End */
a r to
m e
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
l e ( icens
AND (t1.period_id = t4.value_id)
i l
oZ l
)
e l
/* Attribute Filters */

Marc AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
)
)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 59


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @40 Results in 92391 Ticks

ble
fe r a
PROMPT @Statement 41
rem #execute dbms_application_info.set_module('DWH_TEST','41');
ans
n - t r
o
an
SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
s
ha deฺ
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
r )
ฺa Gui
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
m
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
co ent

'G' || tt1.countrychannel_elgr_id countrychannel_id,
n
'G' || tt1.period_elgr_id period_id,@ ao Stud
'B' || tt1.productgroup_id productgroup_id,

z i l le this
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,

c e loฺ use
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
r to
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
a
m e
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
i l l e ( icens
oZ l
--------------------------
e l
-- TempTable 1

Marc --------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
t8.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,

Oracle Database 11g: New Features for Administrators 60


SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Additional Columns End */


FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
lu_elementgroup_rel t8,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t9,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
ble
lu_elementgroup_rel t4
fe r a
WHERE
/* Attribute Joins */
ans
((t1.outlet_id = t2.outlet_id
n - t r
o
an
/* Customizing Begin */
AND
AND
t1.period_id = t2.period_id
t1.project_id = t2.project_id) s
ha deฺ
/* Customizing End */ r )
ฺa Gui
AND (t2.ch_featurevalue_02_id = t3.value_id)m
co ent

AND (t2.country_channel_id = t4.value_id)
n
AND (t1.item_id = t5.item_id
/* Customizing Begin */ @ ao Stud
AND
z i l le this
t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
c e loฺ use
r to
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
a
m e
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
l e ( icens
AND (t5.pg_featurevalue_01_id = t8.value_id)
i l
oZ l
AND (t1.period_id = t9.value_id)
e l )

Marc /* Attribute Filters */


AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'

Oracle Database 11g: New Features for Administrators 61


AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t7.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t8.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id,
t9.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
ble
GROUP BY
fe r a
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
ans
tt1.pg_featurevalue_15_elrg_id,
n - t r
tt1.pg_featurevalue_01_elgr_id,
a no
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
h a s ฺ
tt1.period_elgr_id
ฺ a r) uide
/
PROMPT @32 Results in 3140 Ticks ฺ c om ent G
a on tud
l l e@ is S
i
ฺz se th
PROMPT @Statement 42
l o
rce to u
rem #execute dbms_application_info.set_module('DWH_TEST','42');
a
SELECT
l e (m ense
'B' || l
Zitt1.ch_featurevalue_09_id
lic ch_featurevalue_09_id,
l o
rce'G'
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
a || tt1.pg_featurevalue_13_elgr_id pg_featurevalue_13_id,
M 'B' || tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t6.elementgroup_id pg_featurevalue_13_elgr_id,
t5.pg_featurevalue_15_id pg_featurevalue_15_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.elementgroup_id countrychannel_elgr_id,

Oracle Database 11g: New Features for Administrators 62


t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
ble
/* Additional Columns Begin */
fe r a
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
ans
/* Additional Columns End */
n - t r
o
an
FROM
lu_item_293 t5,
lu_elementgroup_rel t6, s
ha deฺ
fact_pd_out_itm_293 t1, r )
ฺa Gui
lu_elementgroup_rel t7, m
co ent
lu_outlet_293 t2,
n ฺ
lu_elementgroup_rel t3,
lu_elementgroup_rel t4 @ ao Stud
WHERE
z i l le this
/* Attribute Joins */
c e loฺ use
r to
((t1.outlet_id = t2.outlet_id
a
m
/* Customizing Begin */
e
AND
i l l e ( icens
t1.period_id = t2.period_id

oZ l
AND t1.project_id = t2.project_id)
e l
/* Customizing End */

Marc AND (t2.ch_featurevalue_02_id = t3.value_id)


AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_13_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t5.pg_featurevalue_08_id = 717)
AND (t5.pg_featurevalue_15_id IN (12425,1485))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1952,1953))
AND (t4.elementgroup_id = 14786)

Oracle Database 11g: New Features for Administrators 63


AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
ans
t6.elementgroup_id,
n - t r
o
an
t5.pg_featurevalue_15_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id, s
ha deฺ
t5.productgroup_id, r )
ฺa Gui
t7.elementgroup_id, m
co ent
t2.outlet_id,
n ฺ
t1.project_id,
/* Additional GroupBys Begin */ @ ao Stud
z i l le this
t1.project_id, t1.period_id, t1.outlet_id

c e loฺ use
/* Additional GroupBys End */
) tt1
a r to
GROUP BY
m e
l e ( icens
tt1.ch_featurevalue_09_id,
i l
oZ l
tt1.ch_featurevalue_02_elgr_id,
e l
tt1.pg_featurevalue_13_elgr_id,

Marc tt1.pg_featurevalue_15_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @6 Results in 516 Ticks

PROMPT @Statement 43
rem #execute dbms_application_info.set_module('DWH_TEST','43');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 64


'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_05_id pg_featurevalue_05_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
ble
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
fe r a
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
ans
t8.elementgroup_id period_elgr_id,
n - t r
o
an
t2.outlet_id outlet_id,
t1.project_id project_id,
s
ha deฺ
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales, r )
ฺa Gui
m
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
co ent

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n
@ ao Stud
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
z i l le this
MAX(t1.pd_distribution_factor) distributionfactor,

c e loฺ use
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
a r to
m e
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
l e ( icens
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
i l
oZ l
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
e l /* Additional Columns Begin */

Marc t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id


outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id

Oracle Database 11g: New Features for Administrators 65


/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.value_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t5.pg_featurevalue_05_id = 5447)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id = 3091)
ble
AND NOT ((/* ElementGroup Subselect */
fe r a
(
t5.pg_featurevalue_01_id IN
ans
(SELECT g1.value_id
n - t r
o
an
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */ s
ha deฺ
r )
ฺa Gui
(g1.elementgroup_id IN (1959,1960,1961,1962))
) m
co ent
)
n ฺ
)
)
@ ao Stud
z i l
AND (t4.elementgroup_id = 14786)le this
c e loฺ use
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
a r to
m e
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
l e ( icens
AND (t8.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_02_id,
t7.elementrange_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t8.elementgroup_id,
t2.outlet_id,
t1.project_id,

Oracle Database 11g: New Features for Administrators 66


/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @8 Results in 2093 Ticks
ble
fe r a
ans
PROMPT @Statement 44
n - t r
rem #execute dbms_application_info.set_module('DWH_TEST','44');
a no
SELECT
h a s ฺ
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
ฺ a r) uide
'G' || tt1.pg_featurevalue_13_elgr_idฺc om ent G
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
pg_featurevalue_13_id,
a on tud
'B' || tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id
l e i s S
@ countrychannel_id,
pg_featurevalue_08_id,
i l t h
ฺz productgroup_id,
'G' || tt1.countrychannel_elgr_id
'B' || tt1.productgroup_id
e l o u s e
a rc
'G' || tt1.period_elgr_id
t o period_id,

( m s e
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,

i l l e icen
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,

l o Z l
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,

r c e
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg

Ma --------------------------
FROM

-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t6.elementgroup_id pg_featurevalue_13_elgr_id,
t5.pg_featurevalue_15_id pg_featurevalue_15_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,

Oracle Database 11g: New Features for Administrators 67


MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Additional Columns Begin */


t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_elementgroup_rel t6,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_outlet_293 t2,
ble
lu_elementgroup_rel t3,
fe r a
lu_elementgroup_rel t4
WHERE
ans
/* Attribute Joins */
n - t r
o
an
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id s
ha deฺ
AND t1.project_id = t2.project_id) r )
ฺa Gui
/* Customizing End */ m
co ent

AND (t2.ch_featurevalue_02_id = t3.value_id)
n
AND (t1.item_id = t5.item_id @ ao Stud
AND (t2.country_channel_id = t4.value_id)

/* Customizing Begin */
z i l le this
AND
loฺ use
t1.productgroup_id = t5.productgroup_id)
c e
r
/* Customizing End */
a to
m e
AND (t5.pg_featurevalue_13_id = t6.value_id)
l e ( icens
AND (t1.period_id = t7.value_id)
i l
oZ l
)
e l
/* Attribute Filters */

Marc AND ((t5.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id = 717)
AND (t5.pg_featurevalue_15_id IN (12425,1485))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1952,1953))
AND NOT ((/* ElementGroup Subselect */
(
t5.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
)
)
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */

Oracle Database 11g: New Features for Administrators 68


AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
ble
t3.elementgroup_id,
fe r a
t6.elementgroup_id,
t5.pg_featurevalue_15_id,
ans
t5.pg_featurevalue_08_id,
n - t r
o
an
t4.elementgroup_id,
t5.productgroup_id,
t7.elementgroup_id, s
ha deฺ
t2.outlet_id, r )
ฺa Gui
t1.project_id, m
co ent
/* Additional GroupBys Begin */
n ฺ
/* Additional GroupBys End */ @ ao Stud
t1.project_id, t1.period_id, t1.outlet_id

) tt1
z i l le this
GROUP BY
c e loฺ use
r
tt1.ch_featurevalue_09_id,
a to
m e
tt1.ch_featurevalue_02_elgr_id,
l e ( icens
tt1.pg_featurevalue_13_elgr_id,
i l
oZ l
tt1.pg_featurevalue_15_id,
e l
tt1.pg_featurevalue_08_id,

Marc tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @6 Results in 1296 Ticks

PROMPT @Statement 45
rem #execute dbms_application_info.set_module('DWH_TEST','45');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,

Oracle Database 11g: New Features for Administrators 69


SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t6.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
ble
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
fe r a
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
ans
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n - t r
o
an
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +

MAX(t1.pd_distribution_factor) distributionfactor, s
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
ha deฺ
r )
ฺa Gui
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag, m
co ent

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n
@ ao Stud
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
z i l
/* Additional Columns Begin */le this
c e loฺ use
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
a r to
m e
/* Additional Columns End */
FROM
i l l e ( icens
oZ l
lu_item_293 t5,
e l lu_elementgroup_rel t6,

Marc fact_pd_out_itm_293 t1,


lu_elementgroup_rel t7,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_01_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 70


AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_02_id = 4165)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t4.elementgroup_id = 14786)


AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
ble
AND (t1.project_type_id = '1'
fe r a
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ans
AND t1.project_type_id = '1'
n - t r
o
an
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
) s
ha deฺ
GROUP BY r )
ฺa Gui
t2.ch_featurevalue_09_id, m
co ent
t3.elementgroup_id,
n ฺ
t5.pg_featurevalue_02_id,
t6.elementgroup_id, @ ao Stud
t4.elementgroup_id,
z i l le this
t5.productgroup_id,
c e loฺ use
r
t7.elementgroup_id,
a to
m
t2.outlet_id,
e
l e ( icens
t1.project_id,
i l
oZ l
/* Additional GroupBys Begin */
e l t1.project_id, t1.period_id, t1.outlet_id

Marc /* Additional GroupBys End */


) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @10 Results in 1188 Ticks

set timing off;


-- set module info to null
execute dbms_application_info.set_module(NULL, NULL);

PROMPT we are done


set autotrace off;
set echo on;
set termout on;
SELECT '@End', sysdate from dual;

Oracle Database 11g: New Features for Administrators 71


spool off;

FIN!

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/AWR/work.sh:
#!/bin/ksh

UNPW="system/oracle"

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

ble
export
fe r a
PATH=/u01/app/oracle/product/11.1.0/db_1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
ans
n - t r
sqlplus -s $UNPW @work.sql &
a no
h a s ฺ
a
----------------------------------------------------------
ฺ r) uide
/home/oracle/solutions/AWR/work.sql: ฺ c om ent G
drop user awrb cascade;
a on tud
l l e @ is Stablespace users temporary
create user awrb identified by i
ฺz se th
awrb default
tablespace temp;
l o
a rce dbatotouawrb;
l e (m ense
grant connect, resource,

Zi l
connect awrb/awrb lic
l o
a rce table work(c number);
create
M
declare
h number;
begin

h:=1;

while h>-1
loop

h := to_char(sysdate,'hh24');

if h>=7 and h<19


then
begin
-- Rate of 8 Tx per sec
insert into work values(1);
commit;
insert into work values(1);
commit;

Oracle Database 11g: New Features for Administrators 72


delete work where rownum<2;
commit;
delete work where rownum<2;
commit;
insert into work values(1);
commit;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

insert into work values(1);


commit;
delete work where rownum<2;
commit;
delete work where rownum<2;
commit;
end;
end if;

if h>=19 or h<7
ble
then
fe r a
begin
-- Rate of 4 Tx per sec
ans
insert into work values(1);
n - t r
o
an
commit;
insert into work values(1);
commit; s
ha deฺ
delete work where rownum<2; r )
ฺa Gui
commit; m
co ent
delete work where rownum<2;
n ฺ
commit;
end; @ ao Stud
end if;
z i l le this
dbms_lock.sleep(1); ce
loฺ use
a r to
m e
end loop;
i l l e ( icens
end; lo
Z l
/rce
M a
----------------------------------------------------------

/home/oracle/solutions/COLCOMP/comp0_insert.sql:
set timing on
INSERT /*+ APPEND */ INTO CUST_NOCOMP
SELECT * FROM SH.CUSTOMERS
/
COMMIT
/

----------------------------------------------------------

/home/oracle/solutions/COLCOMP/comp0_query.sql:
set timing on
set serveroutput on
declare
total_rows number := 0;
begin
for rec in (select cust_id,CUST_VALID

Oracle Database 11g: New Features for Administrators 73


from cust_nocomp
)
loop
total_rows := total_rows + 1;
end loop;
dbms_output.put_line(total_rows||' rows selected.');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

end;
/

----------------------------------------------------------

/home/oracle/solutions/COLCOMP/comp1_insert.sql:
set timing on
INSERT /*+ APPEND */ INTO CUST_HCC_QUERY
SELECT * FROM SH.CUSTOMERS
/
ble
COMMIT
fe r a
/
ans
----------------------------------------------------------
n - t r
o
/home/oracle/solutions/COLCOMP/comp1_query.sql:
s an
set timing on
r ) ha deฺ
set serveroutput on
declare m ฺa Gui
total_rows number := 0;
n ฺ co ent
begin
for rec in (select cust_id,CUST_VALID @ ao Stud
z
from cust_hcc_query i l le this
)
c e loฺ use
loop
a r to
m
total_rows := total_rows + 1;
e
end loop;
i l l e ( icens
oZ l
dbms_output.put_line(total_rows||' rows selected.');
e
end; l
arc
/
M ----------------------------------------------------------
/home/oracle/solutions/COLCOMP/comp2_insert.sql:
set timing on
INSERT /*+ APPEND */ INTO CUST_HCC_ARCHIVE
SELECT * FROM SH.CUSTOMERS
/
COMMIT
/

----------------------------------------------------------

/home/oracle/solutions/COLCOMP/comp2_query.sql:
set timing on
set serveroutput on
declare
total_rows number := 0;
begin
for rec in (select cust_id,CUST_VALID
from cust_hcc_archive

Oracle Database 11g: New Features for Administrators 74


)
loop
total_rows := total_rows + 1;
end loop;
dbms_output.put_line(total_rows||' rows selected.');
end;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/COLCOMP/comp_cleanup.sql:
-- Oracle Server Technologies - Curriculum Development
-- *** For demos only***

set echo on
set timing off
ble
fe r a
connect / as sysdba
ans
/*== Drop test tablespace and user ==*/
n - t r
o
DROP USER compi CASCADE;
s an
r ) ha deฺ
DROP TABLESPACE compi_tbs INCLUDING CONTENTS;
m ฺa Gui
REM *** Finished clean-up of demo objects.
n ฺ co ent
@ ao Stud
----------------------------------------------------------
z i l le this
c e loฺ use
/home/oracle/solutions/COLCOMP/comp_create_tables.sql:
r
-- Hybrid Columnar Compression
a to
m
-- COMPRESS FOR QUERY
connect compie ( ns e
i l l c e
li purge;
Z cust_nocomp
l o
rceTABLE cust_hcc_query;
DROP TABLE
aDROP
M DROP TABLE cust_hcc_archive;
CREATE TABLE cust_nocomp
AS SELECT * FROM SH.CUSTOMERS;

-- Hybrid Columnar Compression


-- COMPRESS FOR QUERY

CREATE TABLE cust_hcc_query


COMPRESS FOR QUERY
AS SELECT * FROM SH.CUSTOMERS;

-- Hybrid Columnar Compression


-- COMPRESS FOR ARCHIVE

CREATE TABLE cust_hcc_archive


COMPRESS FOR ARCHIVE HIGH
AS SELECT * FROM SH.CUSTOMERS;

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 75


/home/oracle/solutions/COLCOMP/comp_setup.sql:
-- Oracle Server Technologies - Curriculum Development
-- *** For demos only***

connect / as sysdba
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/*== Drop and create a demo tablespace and user ==*/

set echo off


DROP USER compi CASCADE;

DROP TABLESPACE compi_tbs INCLUDING CONTENTS;

set echo on
CREATE SMALLFILE TABLESPACE COMPI_TBS
DATAFILE '+DATA'
ble
SIZE 100M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE 32767M NOLOGGING
fe r a
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
ans
CREATE USER compi IDENTIFIED BY compi
n - t r
o
an
DEFAULT TABLESPACE compi_tbs TEMPORARY TABLESPACE temp;

GRANT connect, resource, dba to compi; s


ha deฺ
GRANT ALL on sh.sales TO compi; r )
ฺa Gui
m
co ent
n ฺ
ao Stud
----------------------------------------------------------
@
z i l le this
/home/oracle/solutions/COLCOMP/comp_view_storage.sql:

c e loฺ use
--SELECT segment_name,sum(bytes)/1024/1024 MB
col segment_name format
set linesize 200 a
r a40
to
m e
i l l e ( icens
Z
set timing off l
SELECTlosegment_name,sum(bytes)/1024/1024 MB
ce user_segments
arFROM
M WHERE segment_name in ('CUST_NOCOMP','CUST_HCC_QUERY','CUST_HCC_ARCHIVE')
GROUP BY segment_name
ORDER BY MB
/

set serveroutput on
declare
nocomp_bytes number;
begin
select bytes into nocomp_bytes
from user_segments
where segment_name = 'CUST_NOCOMP';

dbms_output.put_line('STORAGE SAVINGS');
dbms_output.put_line('--------------------------------------------');
for rec in (select segment_name, nocomp_bytes/bytes compression_ratio
from dba_segments
where segment_name in ('CUST_HCC_QUERY','CUST_HCC_ARCHIVE')
)
loop

Oracle Database 11g: New Features for Administrators 76


dbms_output.put_line(rec.segment_name||': '||rec.compression_ratio||'X
Savings.');
end loop;
end;
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select table_name,compression,compress_for
from user_tables
where table_name in ('CUST_NOCOMP','CUST_HCC_QUERY','CUST_HCC_ARCHIVE');

----------------------------------------------------------

/home/oracle/solutions/COLCOMP/old_comp_create_tables.sql:
-- Hybrid Columnar Compression
-- COMPRESS FOR QUERY
connect compi
ble
fe r a
DROP TABLE cust_nocomp purge;
DROP TABLE cust_hcc_query;
ans
DROP TABLE cust_hcc_archive;
n - t r
o
CREATE TABLE cust_nocomp
s an
AS SELECT * FROM SH.CUSTOMERS;
r ) ha deฺ
-- Hybrid Columnar Compression m ฺa Gui
-- COMPRESS FOR QUERY
n ฺ co ent
CREATE TABLE cust_hcc_query @ ao Stud
ORGANIZATION HYBRID COLUMNARille h is
COMPRESS FOR QUERY z
loฺ use t
r c e
AS SELECT * FROM SH.CUSTOMERS;
m a e to
l e ( ARCHIVE
-- Hybrid Columnar
i l e ns
Compression
c
l o Z
-- COMPRESS FOR li
rce TABLE cust_hcc_archive
aCREATE
M ORGANIZATION HYBRID COLUMNAR
COMPRESS FOR ARCHIVE
AS SELECT * FROM SH.CUSTOMERS;

----------------------------------------------------------

/home/oracle/solutions/DBReplay/WcrUpdateGrid.java:
/*
* This program updates the Grid. Must be invoked with one argument: color
*/

// You need to import the java.sql and JDBC packages to use JDBC
import java.util.*;
import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.OracleDataSource;

// We import java.io to be able to read from the command line


import java.io.*;

class WcrUpdateGrid

Oracle Database 11g: New Features for Administrators 77


{
public static void main(String args[]) throws SQLException, IOException
{
System.out.print("Connecting to the database...");
System.out.flush();
System.out.println("Connecting...");
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

// Open an OracleDataSource and get a connection


OracleDataSource ods = new OracleDataSource();
ods.setURL("jdbc:oracle:oci:jfv/jfv@ORCL");
Connection conn = ods.getConnection();
System.out.println("connected.");

Random rn = new Random();


int i = 0;
String argString = "";

ble
if (args.length > 0) {
fe r a
for (String arg: args) {
argString += arg;
ans
}
n - t r
argString = argString.trim();
a no
}
h a s ฺ
e
for (i = 0; i < 300; i++) {
// Prepare to update the grid with a m ฺar) Guid
color
PreparedStatement pstmt =
n ฺ co eset n t
conn.prepareStatement ("update
a o u
wcr_grid
t d color=? where xcoor=? and
ycoor=?");
l l e@ is S // The first ? is for COLOR
i
ฺz se th
pstmt.setString (1, argString);
pstmt.setInt (2, o
c e l Math.abs(rn.nextInt()
u
% 10)); // The second ? is for
XCOOR
a r(3, Math.abs(rn.nextInt()
to
pstmt.setInt
( m s e % 10)); // The fird ? is for

cen
ilDolethe liupdate
YCOOR
Z
//

r c elo pstmt.execute ();

Ma
// Close the statement
pstmt.close();

try {
Thread.currentThread().sleep(200);
}
catch (InterruptedException e) {
e.printStackTrace();
}

conn.close();
System.out.println("Done.");
}
}

----------------------------------------------------------

/home/oracle/solutions/DBReplay/wcr_demo_change.sql:
SET ECHO ON

Oracle Database 11g: New Features for Administrators 78


SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

connect jfv/jfv

CREATE or REPLACE TRIGGER jfv.strange


BEFORE DELETE OR INSERT OR UPDATE ON jfv.wcr_grid
FOR EACH ROW
DECLARE
x number;
BEGIN
for i in 1..200000 loop
ble
x:=1;
fe r a
end loop;
END;
ans
/
n - t r
a no
h a
---------------------------------------------------------- s ฺ
ฺ a r) uide
#!/bin/bash ฺ c om ent G
/home/oracle/solutions/DBReplay/wcr_demo_dbchange.sh:

a on tud
cd /home/oracle/solutions/DBReplay
l l e@ is S
i
ฺz se th
export ORACLE_SID=orcl
l o
a rce to u
l e (m ense
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export Zi l lic
l o
rce
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X

M a
11R6/bin

sqlplus jfv/jfv < wcr_demo_change.sql

----------------------------------------------------------

/home/oracle/solutions/DBReplay/wcr_demo_init_grid.sql:
SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100

drop user jfv cascade;

create user jfv identified by jfv


default tablespace users
temporary tablespace temp;

Oracle Database 11g: New Features for Administrators 79


grant connect, resource, dba to jfv;

connect jfv/jfv

drop table wcr_grid purge;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

create table wcr_grid


( pixid number not null
,xcoor number not null
,ycoor number not null
,color varchar2(30) not null
,constraint wcr_grid_pk primary key (pixid)
);

declare
ble
id number;
fe r a
x number;
y number;
ans
c varchar2(100);
n - t r
o
an
begin
x := 0;
y := 0; s
ha deฺ
id := 0; r )
ฺa Gui
c := 'black'; m
co ent
n ฺ
for i in 1..10 loop
@ ao Stud
for i in 1..10 loop
z i l le this
c e loฺvalues u e x, y, c);
s(id,
r
insert into wcr_grid
y := y + 1; a to
m e
id := id
i l l e (+ 1;icens
l o Z l
e
end loop;

Marc x := x + 1;
y := 0;

end loop;
end;
/

commit;

----------------------------------------------------------

/home/oracle/solutions/DBReplay/wcr_demo_init_grid_table.sql:
connect jfv/jfv

delete wcr_grid;

commit;

declare

Oracle Database 11g: New Features for Administrators 80


id number;
x number;
y number;
c varchar2(100);
begin
x := 0;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

y := 0;
id := 0;
c := 'black';

for i in 1..10 loop

for i in 1..10 loop

insert into wcr_grid values (id, x, y, c);


y := y + 1;
ble
id := id + 1;
fe r a
end loop;
ans
n - t r
o
an
x := x + 1;
y := 0;
s
ha deฺ
end loop; r )
ฺa Gui
end; m
co ent
/
n ฺ
commit; @ ao Stud
z i l le this
c e loฺ use
r to
----------------------------------------------------------
a
m e
l e ( icens
/home/oracle/solutions/DBReplay/wcr_demo_workload.sh:
i l
Z
#!/bin/bash
l o l
ce be executed as user oracle
#
a#rMust
M#
cd /home/oracle/solutions/DBReplay

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/usr/java/jdk1.5.0_16/bin:/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr
/bin:/usr/local/bin:/usr/X11R6/bin

export
CLASSPATH=.:$ORACLE_HOME/jdbc/lib/ojdbc5.jar:$ORACLE_HOME/jlib/orai18n.jar

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

rm WcrUpdateGrid.class

javac WcrUpdateGrid.java

Oracle Database 11g: New Features for Administrators 81


date

java WcrUpdateGrid red &


java WcrUpdateGrid green &
java WcrUpdateGrid Blue &
java WcrUpdateGrid black &
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

java WcrUpdateGrid yellow &


java WcrUpdateGrid orange &
java WcrUpdateGrid salmon &

wait

date

----------------------------------------------------------
ble
fe r a
/home/oracle/solutions/DBReplay/wcr_init_grid.sh:
#!/bin/bash
ans
#
n - t r
# Must be executed as user oracle
a no
#
h a s ฺ
export ORACLE_SID=orcl
ฺ a r) uide
ฺ c om ent G
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
a on tud
export
l l e@ is S
i
ฺz se th
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
l o
a rce system/oracle_4U
t o u
( m
$ORACLE_HOME/bin/sqlplus
s e <

ille licen
/home/oracle/solutions/DBReplay/wcr_demo_init_grid.sql
Z
r c elo
a
----------------------------------------------------------
M /home/oracle/solutions/DBReplay/wcr_init_grid_table.sh:
#!/bin/bash
#
# Must be executed as user oracle
#

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

$ORACLE_HOME/bin/sqlplus system/oracle_4U <


/home/oracle/solutions/DBReplay/wcr_demo_init_grid_table.sql

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 82


/home/oracle/solutions/DBReplay/wcr_printgrid.sh:
#!/bin/ksh
#
# wcr_printgrid.sh
#
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

$ORACLE_HOME/bin/sqlplus jfv/jfv
@/home/oracle/solutions/DBReplay/wcr_printgrid.sql
ble
fe r a
----------------------------------------------------------
ans
n - t r
/home/oracle/solutions/DBReplay/wcr_printgrid.sql:
a no
SET ECHO ON
h a s ฺ
SET SERVEROUTPUT ON
ฺ a r) uide
declare ฺ c om ent G
col varchar2(10);
a on tud
begin
l l e@ is S
for i in 0..9 loop i
ฺz se th
for j in 0..9 loop
l o
rce ');tinto
select substr(color,1,1)
a o u col from wcr_grid where xcoor=i and ycoor=j;
end loop; e (m
dbms_output.put(col||'
l e n se
Zi l lic
dbms_output.put_line('');
l o
rce
end loop;
aend;
M /exit;

----------------------------------------------------------

/home/oracle/solutions/DBReplay/wcr_updategrid.sql:
begin
for i in 1..300 loop
update wcr_grid set color='&1' where xcoor=floor(dbms_random.value(0,10)) and
ycoor=floor(dbms_random.value(0,10));
commit;
dbms_lock.sleep(0.1);
end loop;
end;
/
exit;

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 83


/home/oracle/solutions/DRA/dra1_corruption.sh:
#!/bin/bash

export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

echo "******************************************* "


echo "For demo purposes ONLY:"
echo "* Shutdown database"

sqlplus "/ as sysdba" << EOF


shutdown immediate
ble
EOF
fe r a
ans
echo "******************************************* "
n - t r
echo "For demo purposes ONLY:"
a no
echo "* Corrupt datafiles to produce failures"
h a s ฺ
a r) uide
cp /u01/app/oracle/oradata/users2.dbf /u01/app/oracle/oradata/users2.dbf.old

rm -Rf /u01/app/oracle/oradata/users2.dbfฺco
m nt G
a t u de
on/u01/app/oracle/oradata/example2.dbf.old
mv /u01/app/oracle/oradata/example2.dbf
l l e@ is S
i
ฺz se th
exit
l o
a rce to u
l e (m ense
----------------------------------------------------------
Zi l lic
l o
rce
/home/oracle/solutions/DRA/dra1_setup.sh:

M a
#!/bin/bash

export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

echo "******************************************* "


echo "For demo purposes ONLY"
echo "Create data corruption for scenario 1"

./dra1_corruption.sh

echo "Setup 1 completed."


exit

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 84


/home/oracle/solutions/DRA/dra2_corruption.sh:
#!/bin/bash

export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

cd /home/oracle/solutions/DRA

echo "******************************************* "


echo "For demo purposes ONLY:"
echo "Create block corruption for scenario 2"
echo "Please wait setup in process"

ble
fe r a
sqlplus /nolog << EOF
connect / as sysdba
ans
@dra2_setup2.sql
n - t r
o
an
EOF
chmod 777 dra2*
./dra2_setup2a.sh s
ha deฺ
./dra2_setup2b.sh r )
ฺa Gui
./dra2_setup2c.sh m
co ent
n ฺ
sqlplus /nolog << EOF
connect / as sysdba @ ao Stud
@dra2_setup3.sql
z i l le this
EOF
c e loฺ use
echo "Setup 2 completed."
a r to
exit
m e
i l l e ( icens
l o Z l
ce
----------------------------------------------------------
a r
M /home/oracle/solutions/DRA/dra2_setup2.sql:
REM For demo purposes ONLY:
REM Select blocks to corrupt for scenario 2

set heading off


set pages 1000
set lines 81
set echo off
set verify off
set feedback off

spool dra2_setup2a.sh

SELECT 'dd of=/u01/app/oracle/oradata/example2.dbf bs=8192 conv=notrunc seek='


|| to_number(S.HEADER_BLOCK+1)|| ' << EOF',
'CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt
', 'EOF'
FROM V$DATAFILE D, DBA_SEGMENTS S
WHERE D.FILE#=S.HEADER_FILE
AND S.SEGMENT_NAME = 'REGIONS2'
AND S.OWNER = 'HR';

Oracle Database 11g: New Features for Administrators 85


spool off
spool dra2_setup2b.sh

SELECT 'dd of=/u01/app/oracle/oradata/example2.dbf bs=8192 conv=notrunc seek='


|| to_number(S.HEADER_BLOCK+1)|| ' << EOF',
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt
', 'EOF'
FROM V$DATAFILE D, DBA_SEGMENTS S
WHERE D.FILE#=S.HEADER_FILE
AND S.SEGMENT_NAME = 'EMPLOYEES2'
AND S.OWNER = 'HR';

spool off

spool dra2_setup2c.sh
ble
fe r a
SELECT 'dd of=/u01/app/oracle/oradata/example2.dbf bs=8192 conv=notrunc seek='
n s
tra corrupt
|| to_number(S.HEADER_BLOCK+1)|| ' << EOF',
n
'CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT -
', 'EOF'
a no
FROM V$DATAFILE D, DBA_SEGMENTS S
WHERE D.FILE#=S.HEADER_FILE
h a s ฺ
AND S.SEGMENT_NAME = 'LOCATIONS2'
ฺ a r) uide
AND S.OWNER = 'HR';
ฺ c om ent G
spool off
a on tud
exit
l l e@ is S
i
ฺz se th
l o
rce to u
----------------------------------------------------------
a
l e (m ense
/home/oracle/solutions/DRA/dra2_setup2a.sh:
Zi l lic
l o
e corrupt CORRUPT corrupt CORRUPT corrupt
dd of=/u01/app/oracle/oradata/example2.dbf bs=8192 conv=notrunc seek=131 << EOF
r c
MaEOF
CORRUPT CORRUPT corrupt CORRUPT corrupt

----------------------------------------------------------

/home/oracle/solutions/DRA/dra2_setup2b.sh:

dd of=/u01/app/oracle/oradata/example2.dbf bs=8192 conv=notrunc seek=147 << EOF


CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt
EOF

----------------------------------------------------------

/home/oracle/solutions/DRA/dra2_setup2c.sh:

dd of=/u01/app/oracle/oradata/example2.dbf bs=8192 conv=notrunc seek=139 << EOF


CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt CORRUPT corrupt
EOF

Oracle Database 11g: New Features for Administrators 86


----------------------------------------------------------

/home/oracle/solutions/DRA/dra2_setup3.sql:
REM For demo purposes ONLY

spool dra2_setup3.txt
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

REM ALTER TABLESPACE example ONLINE;


ALTER SYSTEM FLUSH BUFFER_CACHE;

select * from hr.regions2;


select * from hr.locations2;
select * from hr.employees2;
spool off
exit

ble
fe r a
----------------------------------------------------------
ans
/home/oracle/solutions/DRA/dra2_setup3.txt:
n - t r
o
System altered.
s an
r ) ha deฺ
select * from hr.regions2
* m ฺa Gui
ERROR at line 1:
ORA-01578: ORACLE data block corruptedon
ฺco 8,eblock
(file # d
nt # 131)
@ a Stu
ORA-01110: data file 8: '/u01/app/oracle/oradata/example2.dbf'
z i l l e t h is
c e loฺ use
r
select * from hr.locations2
*a to
ERROR at linee 1: m
( ens e
ORA-01578: i l l
ORACLE c block corrupted (file # 8, block # 139)
lidata
Z data file
e l
ORA-01110:o 8: '/u01/app/oracle/oradata/example2.dbf'
a r c
M select * from hr.employees2
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 8, block # 147)
ORA-01110: data file 8: '/u01/app/oracle/oradata/example2.dbf'

----------------------------------------------------------

/home/oracle/solutions/DRA/dra_archivelog.sh:
#!/bin/bash

export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

echo "******************************************* "

Oracle Database 11g: New Features for Administrators 87


echo "For demo purposes ONLY:"
echo " * Unlock HR account with the HR password"
echo " * Enable ARCHIVELOG mode for database"
echo ""
echo "The script may appear to hang at the SQL prompt"
echo "when the database is shutting down and being"
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

echo "opened. Wait a few minutes and it should progress."


echo "******************************************* "

sqlplus "/ as sysdba" << EOF

ALTER USER HR IDENTIFIED BY HR ACCOUNT UNLOCK;


ALTER SYSTEM SET db_recovery_file_dest_size = 7G SCOPE=BOTH;

shutdown immediate
startup mount
ble
alter database archivelog;
fe r a
alter database open;
archive log list
ans
exit
n - t r
EOF
a no
h a s ฺ
a r) uide
----------------------------------------------------------

/home/oracle/solutions/DRA/dra_cleanup.sh: ฺ c om ent G
#!/bin/bash
a on tud
l l e@ is S
export ORACLE_SID=orcl i
ฺz se th
l o
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
a rce to u
11R6/bin
l e (m ense
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X

Zi l lic
l o
e"For cleanup of demo:"
echo "******************************************* "
r c
Maecho " * Lock HR account"
echo

echo " * Disable ARCHIVELOG mode"

# rm -Rf example01.*
# rm -Rf users01.*

sqlplus "/ as sysdba" << EOF

drop tablespace users2 including contents and datafiles;


drop tablespace example2 including contents and datafiles;

ALTER USER HR PASSWORD EXPIRE ACCOUNT LOCK;


ALTER SYSTEM SET db_recovery_file_dest_size = 4272M SCOPE=BOTH;

shutdown immediate
startup mount
alter database noarchivelog;
alter database open;
archive log list

PROMPT "Cleanup finished."

Oracle Database 11g: New Features for Administrators 88


exit
EOF

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/DRA/dra_full_backup.rmn:
configure controlfile autobackup on;

sql 'alter system archive log current';

sql 'alter system archive log current';


sql 'alter system archive log current';
backup database;
sql 'alter system archive log current';
sql 'alter system archive log current';
ble
sql 'alter system archive log current';
fe r a
backup archivelog all delete input;
sql 'alter system archive log current';
ans
sql 'alter system archive log current';
n - t r
sql 'alter system archive log current';
a no
list backup summary;
h a s ฺ
ฺ a r) uide
ฺ c om ent G
----------------------------------------------------------

/home/oracle/solutions/DRA/dra_setup.sh:
a on tud
#!/bin/bash
l l e@ is S
i
ฺz se th
export ORACLE_SID=orcl
l o
rce to u
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
a
export
l e (m ense
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin Zi l lic
l o
a rcetarget / nocatalog <<END!
rman
M list failure;
change failure all closed noprompt;
list failure;

END!

echo "******************************************* "


echo "For demo purposes ONLY"
echo "Run as the OS user who installed the Oracle software, e.g. oracle"

sqlplus / as sysdba << fin!

set echo on

drop tablespace users2 including contents and datafiles;

drop tablespace example2 including contents and datafiles;

Oracle Database 11g: New Features for Administrators 89


create tablespace users2 datafile '/u01/app/oracle/oradata/users2.dbf' size 10M;

create tablespace example2 datafile '/u01/app/oracle/oradata/example2.dbf' size


10M;

create table scott.DEPT2 tablespace users2 as select * from scott.DEPT;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

create table scott.EMP2 tablespace users2 as select * from scott.EMP;


create table scott.BONUS2 tablespace users2 as select * from scott.BONUS;
create table scott.SALGRADE2 tablespace users2 as select * from scott.SALGRADE;

create table hr.regions2 tablespace example2 as select * from hr.regions;


create table hr.locations2 tablespace example2 as select * from hr.locations;
create table hr.employees2 tablespace example2 as select * from hr.employees;

exit;

ble
fin!
fe r a
./dra_archivelog.sh
ans
n - t r
rman target / @dra_full_backup.rmn
a no
echo "Basic setup done."
h a s ฺ
a
echo "Now, run one of the setup scripts for a specific
ฺ u ide
r) scenario."
exit
ฺ c om ent G
a on tud
l l e@ is S
----------------------------------------------------------
i
ฺz se th
l o
/home/oracle/solutions/DRA/dra_shutdown.sh:
#!/bin/bash
a rce to u
l e (m ense
export ORACLE_SID=orcl
Zi l lic
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
exportlo
a r ce
PATH=/u01/app/oracle/product/11.1.0/db_1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
M 11R6/bin
echo "******************************************* "
echo "For demo purposes ONLY:"
echo "* Shutdown database"

sqlplus "/ as sysdba" << EOF


shutdown immediate
EOF

----------------------------------------------------------

/home/oracle/solutions/FDA/create_fla1.sql:
set echo on
DROP FLASHBACK ARCHIVE fla1
/
CREATE FLASHBACK ARCHIVE fla1
TABLESPACE fla_tbs1
QUOTA 10M

Oracle Database 11g: New Features for Administrators 90


RETENTION 1 YEAR

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/FDA/flada_cleanup.sql:
REM Execute this script script for training purposes only
REM Undo Cleanup for Flashback Data Archive
REM Execute script as SYSDBA

set echo on
set serveroutput on
set term on
set lines 200
set pause on
ble
fe r a
connect / as sysdba
ans
DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS and DATAFILES
n - t r
o
an
/
DROP TABLESPACE fla_tbs2 INCLUDING CONTENTS and DATAFILES
/ s
ha deฺ
ALTER USER hr PASSWORD EXPIRE ACCOUNT LOCK r )
ฺa Gui
/ m
co ent
DROP USER archive_admin CASCADE
n ฺ
/
@ ao Stud
drop table hr.employees2 purge;
z i l le this
e loฺ cleanup
prompt Flashback DatacArchive u se complete.
r to
pause Press [Enter]ato continue...
m e
exit
i l l e ( icens
l o Z l
e
----------------------------------------------------------
arc
M /home/oracle/solutions/FDA/flada_dml.sql:
REM "********************************************** "
REM "For demo purposes ONLY: Flashback Data Archive "

connect hr/HR

set echo on
set serveroutput on
-- set verify on
set term on
set lines 200
set pages 44
set pause on pause "Press [Enter] to continue..."

/*== Query the current salary for Mr. Fox ==*/

SELECT employee_id, last_name, salary


FROM hr.employees2
WHERE last_name = 'Fox'
/

Oracle Database 11g: New Features for Administrators 91


pause Press [Enter] to continue...

/*== Increase the salary three times by 1000 ==*/

UPDATE hr.employees2
SET salary = salary + 1000
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

WHERE last_name = 'Fox'


/
COMMIT
/
UPDATE hr.employees2
SET salary = salary + 1000
WHERE last_name = 'Fox'
/
COMMIT
/
ble
UPDATE hr.employees2
fe r a
SET salary = salary + 1000
WHERE last_name = 'Fox'
ans
/
n - t r
o
an
COMMIT
/
pause Press [Enter] to continue... s
ha deฺ
r )
ฺa Gui
/*== Query the up-to-date value for Mr. Fox ==*/ m
SELECT employee_id, last_name, salary on
ฺco dent
FROM hr.employees2 @ a Stu
WHERE last_name = 'Fox'
z i l l e t h is
/
c e loฺ use
a rto continue...
to
pause Press [Enter]
( m s e
ille licen
set pauseZoff

r c elo
set feedback on
a
M ----------------------------------------------------------
/home/oracle/solutions/FDA/flada_list1.sql:
REM "******************************************* "
REM "For demo purposes ONLY:"

connect / as sysdba

set echo on
set serveroutput on
-- set verify on
set term on
set lines 200
set pages 44
set pause on pause "Press [Enter] to continue ..."

/*== To list the available data dictioary views ==*/

SELECT table_name
FROM dict
WHERE table_name LIKE '%FLASHBACK_ARCHIVE%'

Oracle Database 11g: New Features for Administrators 92


/
pause Press [Enter] to continue ...

col FLASHBACK_ARCHIVE_NAME format A25


col ARCHIVE_TABLE_NAME format A20
col TABLE_NAME format A12
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

col OWNER_NAME format A10

DESC dba_flashback_archive
pause Press [Enter] to continue ...

/*== To query the time when the flashback data archive(s) have been created ==*/

SELECT flashback_archive_name, create_time, status


FROM dba_flashback_archive
/
ble
pause Press [Enter] to continue ...
fe r a
DESC dba_flashback_archive_ts
ans
pause Press [Enter] to continue ...
n - t r
a no
h a s ฺ
/*== To list the tablespace(s), which are used for flashback data archives ==*/

SELECT *
ฺ a r) uide
FROM
/
dba_flashback_archive_ts
ฺ c om ent G
pause Press [Enter] to continue ... on
@ a Stud
z
DESC dba_flashback_archive_tables i l le this
loฺ u...
pause Press [Enter] to continue
c e se
a rname(s),tothe owner name(s), and ==*/
/*== Query the table
l
/*== the internale m
e n se table name(s) of the flashback data archive ==*/
( "history"
Zi l lic
SELECTlo*
rce dba_flashback_archive_tables
aFROM
M/
pause Press [Enter] to continue ...
clear columns

connect hr/HR

SELECT table_name
FROM dict
WHERE table_name LIKE '%FLASHBACK_ARCHIVE%'
/
pause Press [Enter] to continue ...
exit

----------------------------------------------------------

/home/oracle/solutions/FDA/flada_setup.sql:
REM "******************************************* "
REM "For demo purposes ONLY:"
REM " * Unlock HR account with the HR password"
REM " * Create ARCHIVE_ADMIN user like HR with ARCHIVE_ADMIN password"

Oracle Database 11g: New Features for Administrators 93


REM " * Setup for Flashback Data Archive"
REM "Execute script as SYSDBA"

CONNECT / AS SYSDBA

set echo on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set serveroutput on
-- set verify on
set term on
set lines 200
set pages 44
set pause on

/*== Create a tablespace for your flashback data archive ==*/


DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS
/
ble
CREATE SMALLFILE TABLESPACE fla_tbs1
fe r a
DATAFILE '+DATA'
SIZE 10M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE 32767M
ans
NOLOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
n - t r
/
a no
pause Press [Enter] to continue...
h a s ฺ
/*== Set up the HR database account for this lesson
ฺ a r) ==*/u ideprivilege. ==*/
/*== Note: The HR user has the UNLIMITED TABLESPACE
ฺ c om ent G system

ALTER USER hr IDENTIFIED BY "HR" ACCOUNT


a on UNLOCK
tud
/ @
le likeththe S
is HR user ==*/
/*== Create an ARCHIVE_ADMIN iuser
z l
/*== with FLA_TBS1 default
c e loฺ tablespace
u se ==*/
a r to DEFAULT IDENTIFIED BY ARCHIVE_ADMIN
m
CREATE USER ARCHIVE_ADMIN
ePROFILE
l
DEFAULT TABLESPACE
i l e ( icFLA_TBS1
e ns TEMPORARY TABLESPACE TEMP
Z
ACCOUNT UNLOCK
l o l
rce Press [Enter] to continue...
/

M a
pause

GRANT ALTER SESSION TO ARCHIVE_ADMIN;


GRANT CREATE DATABASE LINK TO ARCHIVE_ADMIN;
GRANT CREATE SEQUENCE TO ARCHIVE_ADMIN;
GRANT CREATE SESSION TO ARCHIVE_ADMIN;
GRANT CREATE SYNONYM TO ARCHIVE_ADMIN;
GRANT CREATE VIEW TO ARCHIVE_ADMIN;
GRANT UNLIMITED TABLESPACE TO ARCHIVE_ADMIN;
GRANT EXECUTE ON SYS.DBMS_STATS TO ARCHIVE_ADMIN;
GRANT CONNECT, RESOURCE TO ARCHIVE_ADMIN;

/*== copy employees table for demo purposes ==*/

connect hr/HR

drop table employees2 purge;

create table employees2 as select * from employees;

CONNECT / AS SYSDBA

Oracle Database 11g: New Features for Administrators 94


/*== Setup for Flashback Data Archive completed ==*/
/*== The ARCHIVE_ADMIN user has the password: ARCHIVE_ADMIN ==*/
/*== The HR user has the password: HR ==*/

pause Press [Enter] to continue...


set pause off
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set feedback on

----------------------------------------------------------

/home/oracle/solutions/FDA/flada_tbs2.sql:
REM "******************************************* "
REM "For demo purposes ONLY:"
REM "Execute script as SYSDBA"

CONNECT / AS SYSDBA
ble
fe r a
set echo on
set serveroutput on
ans
-- set verify on
n - t r
set term on
a no
set lines 200
set pages 44
h a s ฺ
set pause on
ฺ a r) uide
/*== Create another tablespace ==*/ ฺ c om ent G
a on and tudDATAFILES
DROP TABLESPACE fla_tbs2 INCLUDING @ CONTENTS
le this S
/
z i l
c e loฺ fla_tbs2
u se
r
CREATE SMALLFILE TABLESPACE
DATAFILE '+DATA' a to
m
(AUTOEXTEND e
ns ONLOCAL
ille MANAGEMENT
e
SIZE 10M REUSE NEXT 640K MAXSIZE 32767M
NOLOGGINGZEXTENT li c SEGMENT SPACE MANAGEMENT AUTO
l o
rce Press [Enter] to continue...
/
apause
M ----------------------------------------------------------
/home/oracle/solutions/FDA/query_fox_versions.sql:
SELECT last_name, email, old_email, salary, total_comp, versions_endtime
FROM hr.employees2
VERSIONS BETWEEN TIMESTAMP (SYSTIMESTAMP - INTERVAL '60' MINUTE) AND
SYSTIMESTAMP
WHERE last_name = 'Fox'
ORDER BY versions_endscn

----------------------------------------------------------

/home/oracle/solutions/FTX/flatxn_archivelog.sh:
echo "******************************************* "
echo "For demo purposes ONLY:"
echo " * Unlock HR account"
echo " * Enable ARCHIVELOG mode for database"
echo ""

Oracle Database 11g: New Features for Administrators 95


echo "The script may appear to hang at the SQL prompt"
echo "when the database is shutting down and being"
echo "opened. Wait a few minutes and it should progress."
echo "******************************************* "

sqlplus "/ as sysdba" << EOF


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ALTER USER HR IDENTIFIED BY hr ACCOUNT UNLOCK;


ALTER SYSTEM SET db_recovery_file_dest_size = 7G SCOPE=BOTH;

shutdown immediate
startup mount
alter database archivelog;
alter database open;
archive log list
exit
ble
EOF
fe r a
----------------------------------------------------------
ans
n - t r
/home/oracle/solutions/FTX/flatxn_cleanup.sh:
a no
echo "******************************************* "
h a s ฺ
echo "For cleanup of demo:"
ฺ a r) uide
echo " * Change HR password back to HR"
echo " * Disable ARCHIVELOG mode" ฺ c om ent G
a on tud
# rm -Rf example01.*
l l e@ is S
# rm -Rf users01.* i
ฺz se th
l o
sqlplus "/ as sysdba"c<<
a r e EOFto u
ALTER SYSTEM e
l SET
e n se
(mdb_recovery_file_dest_size = 4272M SCOPE=BOTH;
i l
Zimmediateli c
l o
rce mount
shutdown
astartup
M alter database noarchivelog;
alter database open;
archive log list

PROMPT "Cleanup finished."


exit
EOF

----------------------------------------------------------

/home/oracle/solutions/FTX/flatxn_cleanup1.sql:
REM Execute this script script for training purposes only
REM Undo Setup for Flashback Transaction
REM Execute script as SYSDBA

set echo on
set serveroutput on
set term on
set lines 200

Oracle Database 11g: New Features for Administrators 96


set pause on

connect / as sysdba

DELETE FROM hr.regions WHERE region_id=10;


DELETE FROM hr.regions WHERE region_id=20;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

DELETE FROM hr.regions WHERE region_id=30;


DELETE FROM hr.regions WHERE region_id=40;
DELETE FROM hr.regions WHERE region_id=50;
COMMIT;

ALTER DATABASE DROP SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;


ALTER DATABASE DROP SUPPLEMENTAL LOG DATA;
REVOKE EXECUTE ON dbms_flashback FROM hr;
REVOKE select any transaction FROM hr;

ble
exit
fe r a
----------------------------------------------------------
ans
n - t r
/home/oracle/solutions/FTX/flatxn_setup1.sql:
a no
REM "******************************************* "
REM "For demo purposes ONLY:"
h a s ฺ
REM " * Setup for Flashback Transaction"
ฺ a r) uide
REM "Execute script as SYSDBA"
ฺ c om ent G
set echo on
a on tud
set serveroutput on
l l e@ is S
set term on i
ฺz se th
set lines 200
l o
set pause on
a rce to u
l
/*== Set up the e (m e n se account for this lab ==*/
HR database
Zi l lic
ALTER lo
ce DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
DATABASE ADD SUPPLEMENTAL LOG DATA;
a r
ALTER
M GRANT EXECUTE ON dbms_flashback TO hr;
GRANT select any transaction TO hr;
pause Press [Enter] to continue...

/*== Create test data for flashback transaction ==*/


connect hr/hr

/*== Test transaction 1 ==*/


INSERT INTO hr.regions VALUES (10,'Pole');
INSERT INTO hr.regions VALUES (20,'Moon');
INSERT INTO hr.regions VALUES (30,'Venus');
INSERT INTO hr.regions VALUES (40,'Mars');
INSERT INTO hr.regions VALUES (50,'Saturn');
COMMIT;
pause Press [Enter] to continue...

/*== Test transaction 2 ==*/


/*== Region 10 and 20 has a WAW dependency on transaction 1 ==*/
UPDATE hr.regions SET region_name='Two Poles' WHERE region_id = 10;
UPDATE hr.regions SET region_name='Many Moons' WHERE region_id = 20;
COMMIT;

Oracle Database 11g: New Features for Administrators 97


pause Press [Enter] to continue...

/*== Test transaction 3 ==*/


/*== Region 10 has a WAW dependency on transaction 1 and 2 ==*/
/*== Region 40 and 50 has a WAW dependency on transaction 1 ==*/
UPDATE hr.regions SET region_name='No star' WHERE region_id = 10;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

UPDATE hr.regions SET region_name='Red star' WHERE region_id = 40;


UPDATE hr.regions SET region_name='Big star' WHERE region_id = 50;
COMMIT;
pause Press [Enter] to continue...

/*== Test transaction 4 ==*/


/*== Region 30 has a WAW dependency on transaction 1 ==*/
UPDATE hr.regions SET region_name='Still called Venus' WHERE region_id = 30;
COMMIT;

ble
pause Press [Enter] to continue...
fe r a
connect / as sysdba
ans
ALTER SYSTEM ARCHIVE LOG CURRENT;
n - t r
o
ALTER SYSTEM ARCHIVE LOG CURRENT;
s an
prompt "Setup for Flashback Transaction completed"r)
ha deฺ
pause Press [Enter] to continue... m ฺa Gui
n ฺ co ent
exit
@ ao Stud
z i l le this
----------------------------------------------------------

c e loฺ use
r to
/home/oracle/solutions/GRID/setupasm.sh:
a
oracleasm exit
m e
oracle Zill
e ( ic-i
oracleasm configure
e s
n<<ENDASMCONF
dba lo
l
e
aYrc
M YENDASMCONF
oracleasm exit
oracleasm init
oracleasm createdisk ASMDISK01 /dev/xvdb
oracleasm createdisk ASMDISK02 /dev/xvdc
oracleasm createdisk ASMDISK03 /dev/xvdd
oracleasm createdisk ASMDISK04 /dev/xvde
oracleasm createdisk ASMDISK05 /dev/xvdf
oracleasm createdisk ASMDISK06 /dev/xvdg
oracleasm createdisk ASMDISK07 /dev/xvdh
oracleasm createdisk ASMDISK08 /dev/xvdi
oracleasm createdisk ASMDISK09 /dev/xvdj
oracleasm createdisk ASMDISK10 /dev/xvdk
oracleasm createdisk ASMDISK11 /dev/xvdl
oracleasm createdisk ASMDISK12 /dev/xvdm
oracleasm createdisk ASMDISK13 /dev/xvdn

oracleasm scandisks
oracleasm listdisks

Oracle Database 11g: New Features for Administrators 98


----------------------------------------------------------

/home/oracle/solutions/HM/hm_fix.sh:
#!/bin/bash
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

cd /home/oracle/solutions/HM

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
ble
fe r a
sqlplus / as sysdba <<FIN!
ans
set echo on
n - t r
a no
variable obj number;
h a s ฺ
begin
ฺ a )
u ide and
rowner='SCOTT'
object_name='TABJFV'; ฺ c om ent G
select object_id into :obj from dba_objects where

end;
a on tud
/
l l e@ is S
i
ฺz se th
print obj;
l o
shutdown immediate;a
rce to u
l e (m ense
startup; Zi l lic
l o
a rce tab$ set cols=1 where obj#=:obj;
update
M commit;

shutdown immediate;

startup;

exec dbms_hm.run_check('Dictionary Integrity


Check','DicoCheckjfv',0,'TABLE_NAME=tab$');

set long 100000

select dbms_hm.get_run_report('DicoCheckjfv') from dual;

FIN!

rman target / nocatalog <<END!

list failure;

END!

Oracle Database 11g: New Features for Administrators 99


----------------------------------------------------------

/home/oracle/solutions/HM/hm_setup.sh:
#!/bin/bash
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus / as sysdba <<FIN!

ble
set echo on
fe r a
create table scott.tabjfv(c number) tablespace users;
ans
n - t r
variable obj number;
a no
begin
h a s ฺ
ฺ a )
u ide and
select object_id into :obj from dba_objects where rowner='SCOTT'
object_name='TABJFV';
end; ฺ c om ent G
/
a on tud
l l e@ is S
print obj; i
ฺz se th
shutdown immediate; ce
l o u
a r t o
startup;
l e (m ense
Zi l lic
updatelotab$ set cols=1001 where obj#=:obj;
a r ce
M commit;
shutdown immediate;

startup;

FIN!

----------------------------------------------------------

/home/oracle/solutions/INFRA/cleanup_07_04.sql:

--Cleanup the objects created for the 7-4 practice.


connect system/oracle

-- cleanup job_history
exec DBMS_SCHEDULER.PURGE_LOG();

-- drop jobs
exec DBMS_SCHEDULER.DROP_JOB('LWTJX');

Oracle Database 11g: New Features for Administrators 100


--drop programs
EXEC DBMS_SCHEDULER.DROP_PROGRAM('PROG_1');
EXEC DBMS_SCHEDULER.DROP_PROGRAM('PROG_3');

-- drop the test_log table


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

DROP TABLE system.test_log PURGE;

exit

----------------------------------------------------------

/home/oracle/solutions/INFRA/cr_lwt_job_arg.sql:
BEGIN
-- This will produce an error the first time it is called.
DBMS_SCHEDULER.DROP_JOB('LWTJX');
ble
END;
fe r a
/
ans
BEGIN
n - t r
o
an
DBMS_SCHEDULER.CREATE_JOB (
job_name
program_name
=> 'LWTJX',
=> 'PROG_3', s
ha deฺ
job_style => 'LIGHTWEIGHT', r )
ฺa Gui
repeat_interval => 'FREQ=DAILY', m
co ent
enabled => TRUE,
n ฺ
comments
ao Stud
=> 'Show an entry in the Jobs Dictionary tables');
@
-- CREATE job arguments for
z i l lethe jobthis
c e loฺ use
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(
r => 1,to
job_name => 'SYSTEM.LWTJX',
a
m
argument_position
e
( e=>ns'TEST_VALUE');
l e
argument_value
l
Zi lic
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(
l o
e job_name => 'SYSTEM.LWTJX',
arc argument_position => 2,
M END; argument_value => 'CREATE_END');

----------------------------------------------------------

/home/oracle/solutions/INFRA/cr_test_log.sql:
set echo on
-- cleanup previous runs
-- you will see an error the first time this script is run

drop table system.test_log;

-- create a table to hold timing information

create table system.test_log(


job_type VARCHAR2(10),
timemark VARCHAR2(10),
act_time TIMESTAMP with TIME ZONE)
/

Oracle Database 11g: New Features for Administrators 101


----------------------------------------------------------

/home/oracle/solutions/INFRA/exec_time.sql:
select max(act_time)- min(act_time)
from test_log
where timemark = 'DONE'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/INFRA/get_autotask_time.sql:
set echo on

SELECT client_name,
mean_job_duration,
resource_percentage
ble
FROM DBA_AUTOTASK_CLIENT
fe r a
/
ans
----------------------------------------------------------
n - t r
o
/home/oracle/solutions/INFRA/get_user_job_args.sql:
s an
column job_name format A10
r ) ha deฺ
colum argument_position format 99999 HEADING 'Arg Position'
column argument_type format A10 HEADING 'Arg Type' m ฺa Gui
column argument_name format A10 HEADING 'Arg Name'
n ฺ co ent
column value format A20
@ ao Stud
SELECT job_name, argument_name,
z i l leargument_position,
t h is
argument_type, value oฺ
c e l u se
r
FROM USER_SCHEDULER_JOB_ARGS
a to
/
m e
i l l e ( icens
Z l
----------------------------------------------------------
l o
rce
a/home/oracle/solutions/INFRA/get_user_jobs.sql:
M column job_name format A20
column job_style format A20
column program_name format A20

SELECT job_name, job_style, program_name


FROM USER_SCHEDULER_JOBS
/

----------------------------------------------------------

/home/oracle/solutions/INFRA/lwt_job_arr.sql:
DECLARE
newjob sys.job;
newjobarr sys.job_array;
newjobname VARCHAR2(30);
BEGIN
-- Create an array of JOB object types
newjobarr := sys.job_array();

-- Allocate sufficient space in the array


newjobarr.extend(10);

Oracle Database 11g: New Features for Administrators 102


--create 10 arrays of 10 jobs each
FOR j in 1..&1 LOOP
-- Add definitions for 10 jobs
FOR i IN 1..10 LOOP
-- Create a JOB object type
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

newjob := sys.job(job_name => 'LWTJK' || to_char(i)||'_'||to_char(j),


job_style => 'LIGHTWEIGHT',
job_template => 'PROG_1',
enabled => TRUE
);

-- Add it to the array


newjobarr(i) := newjob;
END LOOP;

ble
INSERT INTO TEST_LOG
fe r a
VALUES('LWTJ','START',SYSTIMESTAMP);
ans
-- Call CREATE_JOBS to create jobs in one transaction
n - t r
o
an
DBMS_SCHEDULER.CREATE_JOBS(newjobarr, 'TRANSACTIONAL');

INSERT INTO TEST_LOG s


ha deฺ
VALUES('LWTJ','END',SYSTIMESTAMP); r )
ฺa Gui
END LOOP; m
co ent
END;
n ฺ
/
@ ao Stud
z i l le this
----------------------------------------------------------

c e loฺ use
r to
/home/oracle/solutions/INFRA/my_lwt_job.sql:
a
set echo on
m
( ens e
illeprocedure
BEGIN
-- the Z
l o
drop lic will give and error the first time
e
-- this script is run
arc
M END;
sys.DBMS_SCHEDULER.DROP_JOB('my_lwt_job');

DECLARE
jobname VARCHAR2(30);

BEGIN
-- Create the Job
jobname := 'my_lwt_job';

sys.dbms_scheduler.create_job(
job_name => jobname,
program_name => '"SYSTEM"."PROG_1"',
job_class => '"DEFAULT_JOB_CLASS"',
job_style => 'LIGHTWEIGHT',
repeat_interval => 'FREQ=DAILY;INTERVAL=2',
comments => 'Lightweight job',
enabled => TRUE);

END;

Oracle Database 11g: New Features for Administrators 103


/

----------------------------------------------------------

/home/oracle/solutions/INFRA/prog_1.sql:
set echo on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

BEGIN

-- This will produce an error the first


-- time it is run since PROG_1 does not exist
DBMS_SCHEDULER.DROP_PROGRAM (
program_name => '"SYSTEM"."PROG_1"');
END;
/

ble
BEGIN
fe r a
DBMS_SCHEDULER.CREATE_PROGRAM(
program_name=>'"SYSTEM"."PROG_1"',
ans
program_action=>'DECLARE
n - t r
o
an
time_now DATE;
BEGIN
s
ha deฺ
r )
ฺa Gui
INSERT INTO test_log VALUES(''LWT'',''DONE'',SYSTIMESTAMP);
m
co ent
END;',
n ฺ
program_type=>'PLSQL_BLOCK',
number_of_arguments=>0, @ ao Stud
comments=>'Insert a timestampilinto
z le thethtest_log'
is
,
c e loฺ use
enabled=>TRUE);
a r to
END;
m e
/
i l l e ( icens
l o Z l
ce
----------------------------------------------------------
a r
M /home/oracle/solutions/INFRA/prog_3.sql:
set echo on

CREATE OR REPLACE PROCEDURE INS_TEST


(arg1 IN VARCHAR2 DEFAULT 'LWT' ,arg2 IN VARCHAR2 DEFAULT 'DONE') AS
BEGIN
INSERT INTO test_log VALUES(arg1,arg2,SYSTIMESTAMP);
END;
/

BEGIN
-- This will produce an error the first
-- time it is run since PROG_3 does not exist
DBMS_SCHEDULER.DROP_PROGRAM (
program_name => '"SYSTEM"."PROG_3"');
END;
/

BEGIN
DBMS_SCHEDULER.CREATE_PROGRAM(
program_name=>'"SYSTEM"."PROG_3"',

Oracle Database 11g: New Features for Administrators 104


program_action=>'"SYSTEM"."INS_TEST"',
program_type=>'STORED_PROCEDURE',
number_of_arguments=>2,
comments=>'Insert arguments into test_log',
enabled=>FALSE);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

DBMS_SCHEDULER.DEFINE_PROGRAM_ARGUMENT(
program_name=>'"SYSTEM"."PROG_3"',
argument_name=>'"ARG1"',
argument_position=>1,
argument_type=>'VARCHAR2',
default_value=>'LWT',
out_argument=>FALSE);

DBMS_SCHEDULER.DEFINE_PROGRAM_ARGUMENT(
program_name=>'"SYSTEM"."PROG_3"',
ble
argument_name=>'"ARG2"',
fe r a
argument_position=>2,
argument_type=>'VARCHAR2',
ans
default_value=>'DONE',
n - t r
o
an
out_argument=>FALSE);
DBMS_SCHEDULER.ENABLE(
name=>'"SYSTEM"."PROG_3"'); s
ha deฺ
END; r )
ฺa Gui
/ m
co ent
n ฺ
@ ao Stud
----------------------------------------------------------
z i l le this
c e loฺ use
/home/oracle/solutions/INFRA/reg_job_arr.sql:
DECLARE
newjob sys.job; a
r to
m e
l e ( icens
newjobarr sys.job_array;
i l
Z
newjobname
BEGIN lo
l
VARCHAR2(30);

rceCreate an array of JOB object types


a--
M newjobarr := sys.job_array();

-- Allocate sufficient space in the array


newjobarr.extend(10);
-- Create loops of arrays
FOR j in 1..&1 LOOP
-- Add definitions for 10 jobs
FOR i IN 1..10 LOOP
-- Create a JOB object type
newjob := sys.job(job_name => 'REGJK' || to_char(i)||'_'||to_char(j),
job_style => 'REGULAR',
job_template => 'PROG_1',
enabled => TRUE
);

-- Add it to the array


newjobarr(i) := newjob;
END LOOP;

INSERT INTO TEST_LOG


VALUES('REGJOB','START',SYSTIMESTAMP);

Oracle Database 11g: New Features for Administrators 105


-- Call CREATE_JOBS to create jobs in one transaction
DBMS_SCHEDULER.CREATE_JOBS(newjobarr, 'TRANSACTIONAL');

INSERT INTO TEST_LOG


VALUES('REGJOB','END',SYSTIMESTAMP);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

END LOOP;

END;
/

----------------------------------------------------------

/home/oracle/solutions/INFRA/submit_time.sql:
select max(act_time)-min(act_TIME)
from test_log
ble
where timemark <> 'DONE'
fe r a
/
ans
----------------------------------------------------------
n - t r
a no
/home/oracle/solutions/OP/5943776/README.txt:
This is a test patch generated for Oracle University.
h a s ฺ
ฺ a r) uide
ฺ c om ent G
----------------------------------------------------------

a on tud
/home/oracle/solutions/OP/5943776/etc/config/actions.xml:
<oneoff_actions>
l e i s S
@ opt_req="O">
i l t h
ฺz seobject_name="lib/libserver11.a/qcs.o"
<oracle.rdbms version="11.2.0.1.0"
l o
<hotpatch name="5943776_1"
e u
a rc
modified_function="qcsprfro"
t o
filename="hpatch/bug5943776.pch"

l e
</oracle.rdbms>(m ense
path="%ORACLE_HOME%/hpatch" mkpatch_param=""/>

Zi l
</oneoff_actions> lic
l o
ce
----------------------------------------------------------
a r
M /home/oracle/solutions/OP/5943776/etc/config/inventory.xml:
<oneoff_inventory>
<opack_version version="11.1.0.2.0"/>
<reference_id number="5555555"/>
<unique_patch_id>1</unique_patch_id>
<MiniPatchset>false</MiniPatchset>
<date_of_patch year="2009" month="Jul" day="6" time="16:53:30 hrs"
zone="PST8PDT"/>
<unique_tag tag="RDBMS_MAIN_LINUX_090619:qcs.c:11.2.0.1.0"/>
<base_bugs>
<bug number="5943776" description="TEST HOTPATCH FOR OU"/>
</base_bugs>
<required_components>
<component internal_name="oracle.rdbms" version="11.2.0.1.0"
opt_req="O"/>
</required_components>
<os_platforms>
<platform name="Linux Intel" id="46"/>
</os_platforms>
<executables></executables>
<instance_shutdown>false</instance_shutdown>

Oracle Database 11g: New Features for Administrators 106


<instance_shutdown_message></instance_shutdown_message>
<online_rac_installable>false</online_rac_installable>
<sql_migrate>false</sql_migrate>
<prereq_oneoffs></prereq_oneoffs>
<coreq_oneoffs></coreq_oneoffs>
<overlay_oneoffs></overlay_oneoffs>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

<patch_type value=""/>
<system_component_list></system_component_list>
<application_shutdown_list></application_shutdown_list>
<applicable_product value=""/>
<products></products>
<update_components></update_components>
</oneoff_inventory>

----------------------------------------------------------

ble
/home/oracle/solutions/OP/5943776/etc/xml/GenericActions.xml:
fe r a
<?xml version="1.0" standalone="no"?>
<!DOCTYPE pack SYSTEM "GenericActions.dtd">
ans
<one_off_actions>
n - t r
o
an
<globalcmd name="change_dir">

param_num="1" /> s
<perl name="change_dir" module="CWD" perlcmd="chdir" override="true"
ha deฺ
</globalcmd> r )
ฺa Gui
<globalcmd name="copy"> m
co ent

<perl name="copy" module="File::Copy" perlcmd="copy" param_num="2" />
n
</globalcmd>
<globalcmd name="archive_lib"> @ ao Stud
<apply>
z i l le this
c e loฺ use
<system command="ar" parameters='-rc %1 %2' />
</apply>
a r to
<backup>
m e
i l l e ( icens
<system command="ar" parameters='-x %1 %2' />

oZ l
</backup>
e l
</globalcmd>

Marc <globalcmd name="archive_jar">


<apply>
<system command="jar" path='%ORACLE_HOME%/jdk/bin' parameters='-uf
%1 %2 -m %3' />
</apply>
<backup>
<system command="jar" path='%ORACLE_HOME%/jdk/bin' parameters='-xf
%1 %2' />
</backup>
</globalcmd>
<globalcmd name="make">
<apply>
<perl name="change_dir" parameters='%1' />
<system name="make" parameters='-f %2 %3' />
</apply>
<backup>
<perl name="copy" parameters='%4' />
</backup>
</globalcmd>

<os osname="AIX-Based Systems (64-bit)" id="38">


<action name="archive_lib">

Oracle Database 11g: New Features for Administrators 107


<apply>
<system command="ar" parameters='-rc -X32_64 %1 %2' />
</apply>
<backup>
<system command="ar" parameters='-x -X32_64 %1 %2' />
</backup>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

</action>
</os>
<os osname="AIX-Based Systems (64-bit) 5L" id="212">
<action name="archive_lib">
<apply>
<system command="ar" parameters='-rc -X32_64 %1 %2' />
</apply>
<backup>
<system command="ar" parameters='-x -X32_64 %1 %2' />
</backup>
ble
</action>
fe r a
</os>
<os osname="Digital Alpha Open VMS" product_id="89">
ans
</os>
n - t r
o
<opack>
s an
<action>
r ) ha deฺ
<name>ARCHIVE_LIST</name>
<datatype>StringList</datatype> m ฺa Gui
ฺ co ent
<parse_method>parseArchiveList</parse_method>
n
@ ao Stud
<opatch_action>archive</opatch_action>
<validity_check>-e</validity_check>
z i l le this
<validity_check>-f</validity_check>

c e loฺ use
<validity_check>-r</validity_check>
</action>
a r to
<action>
m e
l e ( icens
<name>JAR_LIST</name>
i l
oZ l
<datatype>StringList</datatype>
el <parse_method>parseJarList</parse_method>

Marc <opatch_action>jar</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
</action>
<action>
<name>COPY_LIST</name>
<datatype>StringList</datatype>
<parse_method>parseCopyList</parse_method>
<opatch_action>copy</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
</action>
<action>
<name>MAKE_TRIPLETS</name>
<datatype>StringList</datatype>
<parse_method>parseMakeTriplets</parse_method>
<opatch_action>make</opatch_action>
</action>
<action>
<name>ONEWAYCOPY_LIST</name>

Oracle Database 11g: New Features for Administrators 108


<datatype>StringList</datatype>
<parse_method>parseOneWayCopyList</parse_method>
<opatch_action>onewaycopy</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

</action>
<action>
<name>HOTPATCH_LIST</name>
<datatype>StringList</datatype>
<parse_method>parseHotPatchList</parse_method>
<opatch_action>hotpatch</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
</action>
ble
<action>
fe r a
<name>SQL_LIST</name>
<datatype>StringList</datatype>
ans
<parse_method>parseSqlList</parse_method>
n - t r
o
an
<opatch_action>sql</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check> s
ha deฺ
<validity_check>-r</validity_check> r )
ฺa Gui
</action> m
co ent
<action>
n ฺ
<name>SQL_PROC_LIST</name>
@ ao Stud
<datatype>StringList</datatype>
z i l le this
<parse_method>parseSqlProcList</parse_method>

c e loฺ use
<opatch_action>sql_proc</opatch_action>
r to
<validity_check>-e</validity_check>
a
m e
<validity_check>-f</validity_check>

i l l e ( icens
<validity_check>-r</validity_check>

oZ l
</action>
e l <action>

Marc <name>PORTAL_PATCH</name>
<datatype>StringList</datatype>
<parse_method>parsePortalList</parse_method>
<opatch_action>portal</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
</action>
<action>
<name>PLUGIN_LIST</name>
<datatype>StringList</datatype>
<parse_method>parsePluginActionList</parse_method>
<opatch_action>plugin</opatch_action>
</action>
</opack>
</one_off_actions>

----------------------------------------------------------

/home/oracle/solutions/OP/5943776/etc/xml/ShiphomeDirectoryStructure.xml:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE pack SYSTEM "ShiphomeDirectoryStructure.dtd">

Oracle Database 11g: New Features for Administrators 109


<one_off_directory_structure>
<directories>
<directory>%SH%/files</directory>
<directory>%SH%/etc/config</directory>
<directory>%SH%/etc/xml</directory>
</directories>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

<files>
<copy type="readme">
<from>%BASE_DIR%/README.txt</from>
<to>%SH%/README.txt</to>
<mandatory>Y</mandatory>
</copy>
<copy type="generic_actions">
<from></from>
<to>%SH%/etc/xml/GenericActions.xml</to>
<mandatory>Y</mandatory>
ble
</copy>
fe r a
<copy type="shiphome_directory_structure">
<from></from>
ans
<to>%SH%/etc/xml/ShiphomeDirectoryStructure.xml</to>
n - t r
o
an
<mandatory>Y</mandatory>
</copy>
<copy type="patches"> s
ha deฺ
<from>%BASE_DIR%</from> r )
ฺa Gui
<to>%SH%/files</to> m
co ent
<mandatory>N</mandatory>
n ฺ
</copy>
<create type="inventory"> @ ao Stud
z i l le this
<to>%SH%/etc/config/inventory.xml</to>

c e loฺ use
<method>createInventoryFile</method>
</create>
a r to
m e
<create type="actions">

i l l e ( icens
<to>%SH%/etc/config/actions.xml</to>

oZ l
<method>createActionsFile</method>
e l </create>

Marc </files>
</one_off_directory_structure>

----------------------------------------------------------

/home/oracle/solutions/OP/OP_cleanup.sh:
#!/bin/bash

cd /home/oracle/solutions/OP

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus / as sysdba <<FIN!

shutdown immediate;

Oracle Database 11g: New Features for Administrators 110


FIN!

cd $ORACLE_HOME/lib

ar r libgeneric11.a qcs.o
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

cd $ORACLE_HOME/rdbms/lib

make -f ins_rdbms.mk ioracle

sqlplus / as sysdba <<END!

startup;

select * from mysql_is_great;

ble
END!
fe r a
ans
----------------------------------------------------------
n - t r
a no
/home/oracle/solutions/OP/OP_setup.sh:
#!/bin/bash
h a s ฺ
ฺ a r) uide
cd /home/oracle/solutions/OP
ฺ c om ent G
export ORACLE_SID=orcl
a on tud
l l e@ is S
i
ฺz se th
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
l o
export
a rce to u
11R6/bin
l e (m ense
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X

Zi l lic
emctl lo
e stop dbconsole
arc
M sqlplus / as sysdba <<FIN!
shutdown immediate;

FIN!

cd $ORACLE_HOME/lib

ar x libgeneric11.a qcs.o

ar r libgeneric11.a /home/oracle/solutions/OP/qcs.o

cd $ORACLE_HOME/rdbms/lib

make -f ins_rdbms.mk ioracle

cd $HOME/solutions/OP

sqlplus / as sysdba <<END!

startup;

Oracle Database 11g: New Features for Administrators 111


END!

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/RMAN/cleanup_rcat.sh:
#!/bin/bash

echo "For training purposes ONLY, not for production use"


echo " Shutdown DBTEST database and delete recovery files "
echo " Execute as oracle OS user"

export ORACLE_SID=dbtest
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export ORACLE_BASE=/u01/app/oracle
ble
export
fe r a
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
ans
echo $ORACLE_SID
n - t r
a no
emctl stop dbconsole
h a s ฺ
sqlplus / as sysdba <<-EOF
ฺ a r) uide
shutdown immediate
EOF ฺ c om ent G
a on tud
export ORACLE_SID=orcl
l l e@ is S
i
ฺz se th
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
l o
rce to u
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
a
11R6/bin
l
echo $ORACLE_SID e (m ense
Zi l lic
e l
sqlplus o "/ as sysdba" << EOF
arc
M DROP USER catowner CASCADE;
DROP TABLESPACE RCAT including contents and datafiles;

ALTER SYSTEM SET db_recovery_file_dest_size = 4272M SCOPE=BOTH;

shutdown immediate
startup mount
alter database noarchivelog;
alter database open;
archive log list

PROMPT "Cleanup finished."


exit
EOF

----------------------------------------------------------

/home/oracle/solutions/RMAN/regdb.rman:

CREATE CATALOG TABLESPACE RCAT;

Oracle Database 11g: New Features for Administrators 112


REGISTER DATABASE;

exit;

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/RMAN/rman_archivelog.sh:
echo "******************************************* "
echo "For demo purposes ONLY:"
echo " * Enable ARCHIVELOG mode for database"
echo ""
echo "The script may appear to hang at the SQL prompt"
echo "when the database is shutting down and being"
echo "opened. Wait a few minutes and it should progress."
echo "******************************************* "

ble
export ORACLE_SID=orcl
fe r a
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
ans
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
n - t r
11R6/bin
a no
echo $ORACLE_SID
h a s ฺ
sqlplus "/ as sysdba" << EOF
ฺ a r) uide
set echo on ฺ c om ent G
a on =tu7000M
d SCOPE=BOTH;
@
ALTER SYSTEM SET db_recovery_file_dest_size
le this S
z i l
shutdown immediate
c e loฺ use
startup mount
a r to
m
alter database archivelog;
e
alter database
i l l e (open;c e ns
Z
archive log
exit lo
list li
rce
aEOF
M ----------------------------------------------------------
/home/oracle/solutions/RMAN/setup_cat.sh:
#!/bin/bash

echo "******************************************* "


echo "For training purposes ONLY, not for production use"
echo " * Setup RMAN catalogs in ORCL and DBTEST instances"
echo " Execute as oracle OS user"

export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
echo $ORACLE_SID

sqlplus "sys/oracle_4U as sysdba" @setup_cat_a.sql

rman target sys/oracle_4U catalog catowner/oracle_4U @regdb.rman

Oracle Database 11g: New Features for Administrators 113


export ORACLE_SID=dbtest
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

echo $ORACLE_SID

sqlplus "sys/oracle_4U@dbtest as sysdba" @setup_cat_b.sql

rman target "sys/oracle_4U@dbtest catalog catowner/oracle_4U@dbtest" @regdb.rman

exit

----------------------------------------------------------

ble
/home/oracle/solutions/RMAN/setup_cat_a.sql:
fe r a
REM "For demo purposes ONLY:"
REM "Setup for RMAN Catalog in ORCL"
ans
REM "Execute script as SYSDBA"
n - t r
o
set echo on
s an
set serveroutput on
r ) ha deฺ
set
set
term on
lines 200 m ฺa Gui
/*== Confirm database connection ==*/ on
ฺco dent
SELECT NAME FROM V$DATABASE; @ a Stu
z i l l e t h is
/*== Create RCAT tablespace
DROP TABLESPACE RCAT c e loฺ of u10 e ==*/and datafiles;
sMB
a r to
including contents
m e
l
CREATE TABLESPACE
i l e ( iRCAT
c e ns10M;
l o Z
DATAFILE '+DATA' l SIZE

rceCreate CATOWNER user with "oracle_4U" password ==*/


a/*==
M DROP USER catowner CASCADE;
create user catowner identified by oracle_4U
default tablespace rcat
quota unlimited on rcat;

/*== Grant privileges to CATOWNER ==*/


GRANT CREATE SESSION to catowner;

GRANT RECOVERY_CATALOG_OWNER to catowner;


PROMPT "Setup of CATOWNER user with "oracle_4U" password and RCAT tablespace
complete."
exit

----------------------------------------------------------

/home/oracle/solutions/RMAN/setup_cat_b.sql:
REM "For demo purposes ONLY:"
REM "Setup for RMAN Catalog in DBTEST"
REM "Execute script as SYSDBA"

Oracle Database 11g: New Features for Administrators 114


set echo on
set serveroutput on
set term on
set lines 200

/*== Confirm database connection ==*/


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT NAME FROM V$DATABASE;

/*== Create RCAT tablespace of 10 MB ==*/


DROP TABLESPACE RCAT including contents and datafiles;

CREATE TABLESPACE RCAT


DATAFILE '+DATA' SIZE 10M;

/*== Create CATOWNER user with "oracle_4U" password ==*/


DROP USER catowner CASCADE;
ble
fe r a
create user catowner identified by oracle_4U
default tablespace rcat
ans
quota unlimited on rcat;
n - t r
o
/*== Grant privileges to CATOWNER ==*/
s an
GRANT CREATE SESSION to catowner;
r ) ha deฺ
GRANT RECOVERY_CATALOG_OWNER to catowner; m ฺa Gui
co ent
PROMPT "Setup for RMAN catalog in DBTEST ฺcomplete."
n
exit
@ ao Stud
z i l le this
----------------------------------------------------------

c e loฺ use
r to
/home/oracle/solutions/SEC/cleanup.sql:
a
Connect OE/oee ( m ns e
i
Zon l l li c e
e l
Set echoo
arc
M -- Move the OE.ORDERS table to EXAMPLE tablespace
ALTER TABLE orders MOVE TABLESPACE EXAMPLE;

-- Move the OE.CUSTOMERS table to EXAMPLE tablespace


ALTER TABLE customers MOVE TABLESPACE EXAMPLE;

-- Move the OE.ORD_CUSTOMER_IX index to the EXAMPLE tablespace


ALTER INDEX ORD_CUSTOMER_IX REBUILD TABLESPACE EXAMPLE;

connect / as sysdba

DROP TABLESPACE encts including contents and datafiles;

EXIT

----------------------------------------------------------

/home/oracle/solutions/SEC/cr_dbuser_profile.sql:
set echo on

Oracle Database 11g: New Features for Administrators 115


connect / as sysdba

-- create a DBUSER profile


CREATE PROFILE DBUSER
LIMIT
PASSWORD_VERIFY_FUNCTION verify_function_11g;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- View the settings of the DBUSER profile

SELECT RESOURCE_NAME, LIMIT


FROM DBA_PROFILES
WHERE PROFILE = 'DBUSER'
AND RESOURCE_TYPE = 'PASSWORD';

----------------------------------------------------------
ble
fe r a
/home/oracle/solutions/SEC/cr_verification_funct.sql:
Rem
ans
Rem $Header: utlpwdmg.sql 02-aug-2006.08:18:05 asurpur Exp $
n - t r
o
an
Rem
Rem utlpwdmg.sql
Rem s
ha deฺ
Rem Copyright (c) 2006, Oracle. All rights reserved. r )
ฺa Gui
Rem m
co ent
Rem NAME
n ฺ
Rem
Rem ao Stud
utlpwdmg.sql - script for Default Password Resource Limits
@
Rem DESCRIPTION
z i l le this
Rem
loฺ use
This is a script for enabling the password management features
c e
Rem
r to
by setting the default password resource limits.
a
Rem
m e
Rem NOTES
i l l e ( icens
oZ l
Rem This file contains a function for minimum checking of password
e
Rem l complexity. This is more of a sample function that the customer

MarcRem
Rem
can use to develop the function for actual complexity checks that the
customer wants to make on the new password.
Rem
Rem MODIFIED (MM/DD/YY)
Rem asurpur 05/30/06 - fix - 5246666 beef up password complexity check
Rem nireland 08/31/00 - Improve check for username=password. #1390553
Rem nireland 06/28/00 - Fix null old password test. #1341892
Rem asurpur 04/17/97 - Fix for bug479763
Rem asurpur 12/12/96 - Changing the name of password_verify_function
Rem asurpur 05/30/96 - New script for default password management
Rem asurpur 05/30/96 - Created
Rem

-- This script sets the default password resource parameters


-- This script needs to be run to enable the password features.
-- However the default resource parameters can be changed based
-- on the need.
-- A default password complexity function is also provided.
-- This function makes the minimum complexity checks like
-- the minimum length of the password, password not same as the
-- username, etc. The user may enhance this function according to

Oracle Database 11g: New Features for Administrators 116


-- the need.
-- This function must be created in SYS schema.
-- connect sys/<password> as sysdba before running the script

CREATE OR REPLACE FUNCTION verify_function_11G


(username varchar2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

password varchar2,
old_password varchar2)
RETURN boolean IS
n boolean;
m integer;
differ integer;
isdigit boolean;
ischar boolean;
ispunct boolean;
db_name varchar2(40);
ble
digitarray varchar2(20);
fe r a
punctarray varchar2(25);
chararray varchar2(52);
ans
i_char varchar2(10);
n - t r
simple_password varchar2(10);
a no
reverse_user varchar2(32);
h a s ฺ
BEGIN
ฺ a r) uide
digitarray:= '0123456789';
ฺ c om ent G
chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
a n ud
othe
-- Check for the minimum length @ of S t
password
IF length(password) < 8 THEN
z ill e t i s
h'Password

lo us
raise_application_error(-20001, e length less than 8');
r c e
END IF;
m a e to
i l l e (theicpassword
e ns is same as the username or username(1-100)
Z
-- Check
IF lo
if l
e NLS_LOWER(password) = NLS_LOWER(username) THEN

Marc raise_application_error(-20002, 'Password same as or similar to user');


END IF;
FOR i IN 1..100 LOOP
i_char := to_char(i);
if NLS_LOWER(username)|| i_char = NLS_LOWER(password) THEN
raise_application_error(-20005, 'Password same as or similar to user
name ');
END IF;
END LOOP;

-- Check if the password is same as the username reversed

FOR i in REVERSE 1..length(username) LOOP


reverse_user := reverse_user || substr(username, i, 1);
END LOOP;
IF NLS_LOWER(password) = NLS_LOWER(reverse_user) THEN
raise_application_error(-20003, 'Password same as username reversed');
END IF;

-- Check if the password is the same as server name and or servername(1-100)


select name into db_name from sys.v$database;
if NLS_LOWER(db_name) = NLS_LOWER(password) THEN

Oracle Database 11g: New Features for Administrators 117


raise_application_error(-20004, 'Password same as or similar to server
name');
END IF;
FOR i IN 1..100 LOOP
i_char := to_char(i);
if NLS_LOWER(db_name)|| i_char = NLS_LOWER(password) THEN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

raise_application_error(-20005, 'Password same as or similar to server


name ');
END IF;
END LOOP;

-- Check if the password is too simple. A dictionary of words may be


-- maintained and a check may be made so as not to allow the words
-- that are too simple for the password.
IF NLS_LOWER(password) IN ('welcome1', 'database1', 'account1', 'user1234',
'password1', 'oracle123', 'computer1', 'abcdefg1', 'change_on_install') THEN
ble
raise_application_error(-20006, 'Password too simple');
fe r a
END IF;
ans
-- Check if the password is the same as oracle (1-100)
n - t r
simple_password := 'oracle';
a no
FOR i IN 1..100 LOOP
i_char := to_char(i);
h a s ฺ
a r) uide
if simple_password || i_char = NLS_LOWER(password) THEN

END IF; ฺ c om ent G
raise_application_error(-20007, 'Password too simple ');

END LOOP;
a on tud
l e S one letter, one digit
@ atisleast
i l
ฺz se t
-- Check if the password contains h
-- 1. Check for the digit
e l o u
isdigit:=FALSE;
a rc t o
l
FOR i IN 1..10 e (mLOOP
m := length(password);
e n se
l
FORZji IN 1..mlicLOOP
e l o IF substr(password,j,1) = substr(digitarray,i,1) THEN

Marc isdigit:=TRUE;
GOTO findchar;
END IF;
END LOOP;
END LOOP;

IF isdigit = FALSE THEN


raise_application_error(-20008, 'Password must contain at least one digit,
one character');
END IF;
-- 2. Check for the character
<<findchar>>
ischar:=FALSE;
FOR i IN 1..length(chararray) LOOP
FOR j IN 1..m LOOP
IF substr(password,j,1) = substr(chararray,i,1) THEN
ischar:=TRUE;
GOTO endsearch;
END IF;
END LOOP;
END LOOP;
IF ischar = FALSE THEN

Oracle Database 11g: New Features for Administrators 118


raise_application_error(-20009, 'Password must contain at least one \
digit, and one character');
END IF;

<<endsearch>>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- Check if the password differs from the previous password by at least


-- 3 letters
IF old_password IS NOT NULL THEN
differ := length(old_password) - length(password);

differ := abs(differ);
IF differ < 3 THEN
IF length(password) < length(old_password) THEN
m := length(password);
ELSE
ble
m := length(old_password);
fe r a
END IF;
ans
FOR i IN 1..m LOOP
n - t r
IF substr(password,i,1) != substr(old_password,i,1) THEN
a no
differ := differ + 1;
END IF;
h a s ฺ
END LOOP;
ฺ a r) uide
IF differ < 3 THEN ฺ c om ent G
raise_application_error(-20011,
a oncharacters');
u
'Password
t d should differ from the \
old password by at least
l l e@ is S
3
END IF; i
ฺz se th
END IF;
l o
END IF;
rce to u TRUE ;
-- Everything isafine; return
l
RETURN(TRUE); e (m ense
END; Zi l lic
/
e l o
arc
M -- This script alters the default parameters for Password Management
-- This means that all the users on the system have Password Management
-- enabled and set to the following values unless another profile is
-- created with parameter values set to different value or UNLIMITED
-- is created and assigned to the user.

--ALTER PROFILE DEFAULT LIMIT


--PASSWORD_LIFE_TIME 180
--PASSWORD_GRACE_TIME 7
--PASSWORD_REUSE_TIME UNLIMITED
--PASSWORD_REUSE_MAX UNLIMITED
--FAILED_LOGIN_ATTEMPTS 10
--PASSWORD_LOCK_TIME 1
--PASSWORD_VERIFY_FUNCTION verify_function_11G;

-- Below is the older version of the script

-- This script sets the default password resource parameters


-- This script needs to be run to enable the password features.

Oracle Database 11g: New Features for Administrators 119


-- However the default resource parameters can be changed based
-- on the need.
-- A default password complexity function is also provided.
-- This function makes the minimum complexity checks like
-- the minimum length of the password, password not same as the
-- username, etc. The user may enhance this function according to
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- the need.
-- This function must be created in SYS schema.
-- connect sys/<password> as sysdba before running the script

CREATE OR REPLACE FUNCTION verify_function


(username varchar2,
password varchar2,
old_password varchar2)
RETURN boolean IS
n boolean;
ble
m integer;
fe r a
differ integer;
isdigit boolean;
ans
ischar boolean;
n - t r
ispunct boolean;
a no
digitarray varchar2(20);
punctarray varchar2(25);
h a s ฺ
chararray varchar2(52);
ฺ a r) uide
BEGIN ฺ c om ent G
digitarray:= '0123456789';
a on tud
l l e @ is S
chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
i
ฺz se th
punctarray:='!"#$%&()``*+,-/:;<=>?_';
l o
rce = tis
-- Check if the password
a o usame as the username
( m
IF NLS_LOWER(password)
s e NLS_LOWER(username) THEN

i l l e icen
raise_application_error(-20001, 'Password same as or similar to user');
END IF;
l o Z l
e
Marc-- Check for the minimum length of the password
IF length(password) < 4 THEN
raise_application_error(-20002, 'Password length less than 4');
END IF;

-- Check if the password is too simple. A dictionary of words may be


-- maintained and a check may be made so as not to allow the words
-- that are too simple for the password.
IF NLS_LOWER(password) IN ('welcome', 'database', 'account', 'user',
'password', 'oracle', 'computer', 'abcd') THEN
raise_application_error(-20002, 'Password too simple');
END IF;

-- Check if the password contains at least one letter, one digit and one
-- punctuation mark.
-- 1. Check for the digit
isdigit:=FALSE;
m := length(password);
FOR i IN 1..10 LOOP
FOR j IN 1..m LOOP
IF substr(password,j,1) = substr(digitarray,i,1) THEN
isdigit:=TRUE;

Oracle Database 11g: New Features for Administrators 120


GOTO findchar;
END IF;
END LOOP;
END LOOP;
IF isdigit = FALSE THEN
raise_application_error(-20003, 'Password should contain at least one
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

digit, one character and one punctuation');


END IF;
-- 2. Check for the character
<<findchar>>
ischar:=FALSE;
FOR i IN 1..length(chararray) LOOP
FOR j IN 1..m LOOP
IF substr(password,j,1) = substr(chararray,i,1) THEN
ischar:=TRUE;
GOTO findpunct;
ble
END IF;
fe r a
END LOOP;
END LOOP;
ans
IF ischar = FALSE THEN
n - t r
o
an
raise_application_error(-20003, 'Password should contain at least one \

END IF;
digit, one character and one punctuation');
s
ha deฺ
-- 3. Check for the punctuation r )
ฺa Gui
<<findpunct>> m
co ent
ispunct:=FALSE;
n ฺ
FOR i IN 1..length(punctarray) LOOP
FOR j IN 1..m LOOP @ ao Stud
z i l le this
IF substr(password,j,1) = substr(punctarray,i,1) THEN
ispunct:=TRUE;
c e loฺ use
r
GOTO endsearch;
a to
END IF;
m e
l
END LOOP;
i l e ( icens
oZ l
END LOOP;
e l
IF ispunct = FALSE THEN

Marc raise_application_error(-20003, 'Password should contain at least one \


digit, one character and one punctuation');
END IF;

<<endsearch>>
-- Check if the password differs from the previous password by at least
-- 3 letters
IF old_password IS NOT NULL THEN
differ := length(old_password) - length(password);

IF abs(differ) < 3 THEN


IF length(password) < length(old_password) THEN
m := length(password);
ELSE
m := length(old_password);
END IF;

differ := abs(differ);
FOR i IN 1..m LOOP
IF substr(password,i,1) != substr(old_password,i,1) THEN
differ := differ + 1;
END IF;

Oracle Database 11g: New Features for Administrators 121


END LOOP;

IF differ < 3 THEN


raise_application_error(-20004, 'Password should differ by at \
least 3 characters');
END IF;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

END IF;
END IF;
-- Everything is fine; return TRUE ;
RETURN(TRUE);
END;
/

-- This script alters the default parameters for Password Management


-- This means that all the users on the system have Password Management
-- enabled and set to the following values unless another profile is
ble
-- created with parameter values set to different value or UNLIMITED
fe r a
-- is created and assigned to the user.
ans
-- Enable this if you want older version of the Password Profile parameters
n - t r
o
an
-- ALTER PROFILE DEFAULT LIMIT
--
--
PASSWORD_LIFE_TIME 60
PASSWORD_GRACE_TIME 10 s
ha deฺ
-- PASSWORD_REUSE_TIME 1800 r )
ฺa Gui
-- PASSWORD_REUSE_MAX UNLIMITED m
co ent
-- FAILED_LOGIN_ATTEMPTS 3
n ฺ
--
--
PASSWORD_LOCK_TIME 1/1440
@ ao Stud
PASSWORD_VERIFY_FUNCTION verify_function;
z i l le this
c e loฺ use
----------------------------------------------------------

a r to
m e
/home/oracle/solutions/SEC/query_orders_index.sql:
l e ( orders
select cust_last_name,
i l c e s
norder_id, order_total
Z
from customers,
where lo
li
rceaccount_mgr_id = 145;
customers.customer_id = orders.customer_id

Maand
----------------------------------------------------------

/home/oracle/solutions/SEC/setup_sec.sql:
-- setup practice 14-01
set echo on

connect / as sysdba

ALTER USER HR identified by hr account unlock;

exit;

----------------------------------------------------------

/home/oracle/solutions/SPAbig/6903335/README.txt:
#
# WARNING: Failure to carefully read and understand these requirements may
# result in your applying a patch that can cause your Oracle Server to
# malfunction, including interruption of service and/or loss of data.

Oracle Database 11g: New Features for Administrators 122


#
# If you do not meet all of the following requirements, please log an
# iTAR, so that an Oracle Support Analyst may review your situation. The
# Oracle analyst will help you determine if this patch is suitable for you
# to apply to your system. We recommend that you avoid applying any
# temporary patch unless directed by an Oracle Support Analyst who has
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

# reviewed your system and determined that it is applicable.


#
# Requirements:
#
# - You must have located this patch via a Bug Database entry
# and have the exact symptoms described in the bug entry.
#
# If you do NOT meet these requirements, or are not certain that you meet
# these requirements, please log an iTAR requesting assistance with this
# patch and Support will make a determination about whether you should
ble
# apply this patch.
fe r a
#
#-------------------------------------------------------------------------
ans
# Interim Patch for Base Bugs: 6903335
n - t r
o
an
#-------------------------------------------------------------------------
#
# DATE: Mon May 12 08:34:47 2008 s
ha deฺ
# ------------------------------- r )
ฺa Gui
# Platform Patch for : Generic Patch m
co ent
# Product Version # : 10.2.0.3
n ฺ
# Product Patched
#
: RDBMS
@ ao Stud
# Bugs Fixed by this patch:
z i l le this
# -------------------------
c e loฺ use
r to
# 6903335:RAT/SPA MISSING KEY FUNCTIONALITIES TO SUPPORT TEST UPGRADE FROM 9I
a
# TO 10.2.0.3
m e
#
i l l e ( icens
oZ l
# Patch Installation Instructions:
e l
# --------------------------------

Marc# To apply the patch, unzip the PSE container file:


#
# p6903335_10203_GENERIC.zip
#
# Set your current directory to the directory where the patch
# is located:
#
# % cd 6903335
#
# Ensure that the directory containing the opatch script appears in
# your $PATH; then enter the following command:
#
# % opatch apply
#
# Patch Special Instructions:
# ---------------------------
# cd $OH/rdbms/admin
# sqlplus / as sysdba
# drop table plan_table$; -- drop the plan table if was upgraded.
# @catplan.sql -- recreate the plan table
# @dbmsxpln.sql -- reload dbms_xplan spec
# @prvtxpln.plb -- reload dbms_xplan implementation

Oracle Database 11g: New Features for Administrators 123


# @prvtspao.plb -- reload dbms_sqlpa
#
# If the Oracle inventory is not setup correctly this utility will
# fail. To check accessibility to the inventory you can use the
# command
#
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

# % opatch lsinventory
#
# If you have any problems installing this PSE or are not sure
# about inventory setup please call Oracle support.
#
# Patch Deinstallation Instructions:
# ----------------------------------
# Use the following command:
#
# % cd 6903335
ble
# % opatch rollback -id 6903335
fe r a
#
ans
n - t r
----------------------------------------------------------
a no
h a
/home/oracle/solutions/SPAbig/6903335/etc/xml/GenericActions.xml:s ฺ
<!DOCTYPE pack SYSTEM "GenericActions.dtd"> mฺa
<?xml version="1.0" standalone="no"?> r) uide
<one_off_actions> ฺ c o ent G
<globalcmd name="change_dir">
a on tuperlcmd="chdir"
d
l e@
<perl name="change_dir" module="CWD"
i s S override="true"
param_num="1" /> l
ฺzi se th
</globalcmd>
l o
rce module="File::Copy"
<globalcmd name="copy">
a t o u
( m
<perl name="copy"
s e perlcmd="copy" param_num="2" />

cen
ille name="archive_lib">
</globalcmd>
Z
<globalcmd l i
r c elo <apply>
Ma
<system command="ar" parameters='-rc %1 %2' />
</apply>
<backup>
<system command="ar" parameters='-x %1 %2' />
</backup>
</globalcmd>
<globalcmd name="archive_jar">
<apply>
<system command="jar" path='%ORACLE_HOME%/jdk/bin' parameters='-uf
%1 %2 -m %3' />
</apply>
<backup>
<system command="jar" path='%ORACLE_HOME%/jdk/bin' parameters='-xf
%1 %2' />
</backup>
</globalcmd>
<globalcmd name="make">
<apply>
<perl name="change_dir" parameters='%1' />
<system name="make" parameters='-f %2 %3' />
</apply>
<backup>

Oracle Database 11g: New Features for Administrators 124


<perl name="copy" parameters='%4' />
</backup>
</globalcmd>

<os osname="AIX-Based Systems (64-bit)" id="38">


<action name="archive_lib">
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

<apply>
<system command="ar" parameters='-rc -X32_64 %1 %2' />
</apply>
<backup>
<system command="ar" parameters='-x -X32_64 %1 %2' />
</backup>
</action>
</os>
<os osname="AIX-Based Systems (64-bit) 5L" id="212">
<action name="archive_lib">
ble
<apply>
fe r a
<system command="ar" parameters='-rc -X32_64 %1 %2' />
</apply>
ans
<backup>
n - t r
o
an
<system command="ar" parameters='-x -X32_64 %1 %2' />
</backup>
</action> s
ha deฺ
</os> r )
ฺa Gui
m
<os osname="Digital Alpha Open VMS" product_id="89">
co ent
</os>
n ฺ
<opack> @ ao Stud
<action>
z i l le this
c e loฺ use
<name>ARCHIVE_LIST</name>
r to
<datatype>StringList</datatype>
a
m e
<parse_method>parseArchiveList</parse_method>

i l l e ( icens
<opatch_action>archive</opatch_action>

l o Z <validity_check>-f</validity_check>
l
<validity_check>-e</validity_check>

rce
Ma
<validity_check>-r</validity_check>
</action>
<action>
<name>JAR_LIST</name>
<datatype>StringList</datatype>
<parse_method>parseJarList</parse_method>
<opatch_action>jar</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
</action>
<action>
<name>COPY_LIST</name>
<datatype>StringList</datatype>
<parse_method>parseCopyList</parse_method>
<opatch_action>copy</opatch_action>
<validity_check>-e</validity_check>
<validity_check>-f</validity_check>
<validity_check>-r</validity_check>
</action>
<action>
<name>MAKE_TRIPLETS</name>

Oracle Database 11g: New Features for Administrators 125


<datatype>StringList</datatype>
<parse_method>parseMakeTriplets</parse_method>
<opatch_action>make</opatch_action>
</action>
</opack>
</one_off_actions>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/SPAbig/6903335/etc/xml/ShiphomeDirectoryStructure.xml:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE pack SYSTEM "ShiphomeDirectoryStructure.dtd">
<one_off_directory_structure>
<directories>
<directory>%SH%/files</directory>
<directory>%SH%/etc/config</directory>
ble
<directory>%SH%/etc/xml</directory>
fe r a
</directories>
<files>
ans
<copy type="readme">
n - t r
o
an
<from>%BASE_DIR%/README.txt</from>
<to>%SH%/README.txt</to>
<mandatory>Y</mandatory> s
ha deฺ
</copy> r )
ฺa Gui
<copy type="generic_actions"> m
co ent
<from></from>
n ฺ
<mandatory>Y</mandatory> @ ao Stud
<to>%SH%/etc/xml/GenericActions.xml</to>

</copy>
z i l le this
c e loฺ use
<copy type="shiphome_directory_structure">
r
<from></from>
a to
m e
<to>%SH%/etc/xml/ShiphomeDirectoryStructure.xml</to>

i l l e ( icens
<mandatory>Y</mandatory>

oZ l
</copy>
e l <copy type="patches">

Marc <from>%BASE_DIR%</from>
<to>%SH%/files</to>
<mandatory>N</mandatory>
</copy>
<create type="inventory">
<to>%SH%/etc/config/inventory</to>
<method>createInventoryFile</method>
</create>
<create type="actions">
<to>%SH%/etc/config/actions</to>
<method>createActionsFile</method>
</create>
</files>
</one_off_directory_structure>

----------------------------------------------------------

/home/oracle/solutions/SPAbig/bench80.sh:
#!/bin/ksh

export ORACLE_SID=db10g

Oracle Database 11g: New Features for Administrators 126


export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

export
PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

sqlplus sys/oracle_4US as sysdba <<FIN!

-- as sysdba flush the shared pool


ALTER system flush buffer_cache;
ALTER system flush shared_pool;

-- connect as dwh_test
CONNECT apps/apps;
set echo on;
ble
spool /tmp/dwh_test.log;
fe r a
-- Generated on Thu Sep 18 20:38:59 2003
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY:MON-DD:HH24:MI:SS';
ans
SET LINES 80;
n - t r
o
an
set wrap on
SET PAGES 0;
rem SET TRIMS ON; s
ha deฺ
SET HEADING OFF; r )
ฺa Gui
SELECT '@Start', sysdate from dual; m
co ent
rem SET TERMOUT ON;
n ฺ
rem set ECHO OFF;
SET ECHO ON; @ ao Stud
rem SET FEEDBACK OFF;
z i l le this
c e loฺ use
rem alter session set tracefile_identifier='noprof';
r to
rem alter session set sql_trace=true;
a
m e
alter system set cursor_sharing=exact;
l e ( icens
set autotrace traceonly statistics;
i l
Z
PROMPTlo@Statement 1
l
a rce dbms_application_info.set_module('DWH_TEST','1');
execute
M SET TIMING ON;
SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 1485)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 15 Ticks

PROMPT @Statement 2

Oracle Database 11g: New Features for Administrators 127


rem #execute dbms_application_info.set_module('DWH_TEST','2');

SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 12425)
AND (t2.elementrange_id = 3091)
)
/
ble
PROMPT @1 Results in 0 Ticks
fe r a
ans
n - t r
PROMPT @Statement 3
a no
rem #execute dbms_application_info.set_module('DWH_TEST','3');
h a s ฺ
SELECT DISTINCT
ฺ a r) uide
FROM ฺ c om ent G
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id

lu_pg_featurevalue_15 t1,
a on tud
lu_elementrange_rel t2
l l e@ is S
WHERE i
ฺz se th
/* Attribute Joins */
l o
rce to u BETWEEN t2.lbound AND t2.ubound)
((t1.pg_featurevalue_15_num
a
)
/* Attribute e
l (m e*/nse
Filters
Zi l lic
AND ((t1.pg_featurevalue_15_id = 49620)
AND lo(t2.elementrange_id = 3091)
a r ce )
M/ PROMPT @1 Results in 16 Ticks

PROMPT @Statement 4
rem #execute dbms_application_info.set_module('DWH_TEST','4');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 5454)
AND (t2.elementgroup_id = 6624)
)

Oracle Database 11g: New Features for Administrators 128


/
PROMPT @1 Results in 0 Ticks

PROMPT @Statement 5
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

rem #execute dbms_application_info.set_module('DWH_TEST','5');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 16003)
ans
AND (t2.elementgroup_id = 6624)
n - t r
o
an
)
/
PROMPT @1 Results in 15 Ticks s
ha deฺ
r )
ฺa Gui
m
co ent
n ฺ
PROMPT @Statement 6
@ ao Stud
rem #execute dbms_application_info.set_module('DWH_TEST','6');
z i l le this
SELECT /* ORDERED INDEX(t1)
c e loฺ USE_HASH(t1)
u se pg_featurevalue_13_id,
*/
r to
'B' || t2.pg_featurevalue_13_id
a
( m s e
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

'B' ||Z le licen


'r' || t4.elementrange_id
ilt2.pg_featurevalue_08_id
pg_featurevalue_15_id,
pg_featurevalue_08_id,
e l
'B' o || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Marc 'r' || t5.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)

Oracle Database 11g: New Features for Administrators 129


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ble
)
fe r a
/* Fact Filters */
AND (t1.project_type_id = '1'
ans
)
n - t r
o
an
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id, s
ha deฺ
t4.elementrange_id, r )
ฺa Gui
t2.pg_featurevalue_08_id, m
co ent
t2.pg_featurevalue_01_id,
n ฺ
t5.elementrange_id,
t2.productgroup_id, @ ao Stud
t6.elementgroup_id
z i l le this
/
c e loฺ use
r
PROMPT @69 Results in 12078 Ticks
a to
m e
i l l e ( icens
Z
PROMPTlo@Statement 7
l
a rce#execute dbms_application_info.set_module('DWH_TEST','7');
rem
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */

Oracle Database 11g: New Features for Administrators 130


((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)


AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
ble
AND (t2.pg_featurevalue_02_id IN (4165,4166))
fe r a
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
ans
AND (t5.elementrange_id IN (8686,8687,8688,8689,8690,8691,8692,8693))
n - t r
o
an
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
s
ha deฺ
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ r )
ฺa Gui
) m
co ent
/* Fact Filters */
n ฺ
AND (t1.project_type_id = '1'
) @ ao Stud
GROUP BY
z i l le this
t2.pg_featurevalue_13_id,
c e loฺ use
r
t2.pg_featurevalue_02_id,
a to
m
t4.elementrange_id,
e
l e ( icens
t2.pg_featurevalue_08_id,
i l
oZ l
t2.pg_featurevalue_01_id,
e l
t5.elementrange_id,

Marc t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @160 Results in 14344 Ticks

PROMPT @Statement 8
rem #execute dbms_application_info.set_module('DWH_TEST','8');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,

Oracle Database 11g: New Features for Administrators 131


lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
ble
AND (t2.pg_featurevalue_08_id = 717)
fe r a
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
ans
n
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671 - t r
o
an
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659) s
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t2.pg_featurevalue_05_id,
e
l e ( icens
t2.pg_featurevalue_08_id,
i l
oZ l
t3.elementrange_id,
e l
t2.productgroup_id,

Marc/
t4.elementgroup_id

PROMPT @46 Results in 24281 Ticks

PROMPT @Statement 9
rem #execute dbms_application_info.set_module('DWH_TEST','9');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 132


lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
ble
/* Attribute Filters */
fe r a
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ans
AND (t2.pg_featurevalue_01_id IN
n - t r
o
an
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717)) s
ha deฺ
AND (t2.pg_featurevalue_02_id IN (4165,4166)) r )
ฺa Gui
AND (t2.pg_featurevalue_13_id = 5424) m
co ent
AND (t4.elementrange_id IN (3091,3092))
n ฺ
AND (t6.elementgroup_id = 14659) @ ao Stud
AND (t5.elementrange_id IN (8680,8681,8682,8683,8684,8685,8686))

AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @179 Results in 12500 Ticks

PROMPT @Statement 10
rem #execute dbms_application_info.set_module('DWH_TEST','10');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_18_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 133


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_18_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))) r )
ฺa Gui
AND (t3.elementgroup_id IN (8902,8903)) m
co ent
AND (t4.elementrange_id IN
n ฺ
@ ao Stud
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
z i l le this
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

c e loฺ use
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @40 Results in 1390 Ticks

PROMPT @Statement 11
rem #execute dbms_application_info.set_module('DWH_TEST','11');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,

Oracle Database 11g: New Features for Administrators 134


'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ble
/* Customizing End */
fe r a
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
ans
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
n - t r
o
an
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95)) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l le this
AND (t2.pg_featurevalue_08_id IN (716,717))

c e loฺ use
AND (t2.pg_featurevalue_02_id IN (4165,4166))
r to
AND (t2.pg_featurevalue_13_id = 5424)
a
m e
AND (t4.elementrange_id IN (3091,3092))
l e ( icens
AND (t5.elementrange_id IN (8671,8672,8673,8674,8675,8676,8679))
i l
oZ l
AND (t6.elementgroup_id = 14659)
e l
AND (t1.period_id IN

Marc(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @220 Results in 12297 Ticks

PROMPT @Statement 12
rem #execute dbms_application_info.set_module('DWH_TEST','12');

Oracle Database 11g: New Features for Administrators 135


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || t6.elementgroup_id period_id,


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
s
ha deฺ
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
r )
ฺa Gui
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
m
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
co ent
AND (t1.period_id = t6.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i
AND ((t2.productgroup_id = 15520) l le this
c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND (t2.pg_featurevalue_01_id IN
a
m e
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
l e ( icens
97,3891,71,76,89,92,95))
i l
oZ l
AND (t4.elementrange_id IN (3091,3092,3093,3107))
e l
AND (t5.elementrange_id IN

Marc(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @281 Results in 39812 Ticks

PROMPT @Statement 13
rem #execute dbms_application_info.set_module('DWH_TEST','13');

Oracle Database 11g: New Features for Administrators 136


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || t6.elementgroup_id period_id,


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
s
ha deฺ
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
r )
ฺa Gui
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
m
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
co ent
AND (t1.period_id = t6.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i
AND ((t2.productgroup_id = 15520) l le this
c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND (t2.pg_featurevalue_01_id IN
a
m e
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
l e ( icens
97,3891,71,76,89,92,95))
i l
oZ l
AND (t4.elementrange_id IN (3091,3092,3093,3107))
e l
AND (t5.elementrange_id IN

Marc(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @319 Results in 40938 Ticks

PROMPT @Statement 14
rem #execute dbms_application_info.set_module('DWH_TEST','14');

Oracle Database 11g: New Features for Administrators 137


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'G' || t5.elementgroup_id pg_featurevalue_01_id,
'r' || t6.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
ble
lu_elementgroup_rel t7,
fe r a
lu_elementrange_rel t6
WHERE
ans
/* Attribute Joins */
n - t r
o
an
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id) s
ha deฺ
/* Customizing End */ r )
ฺa Gui
m
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
co ent

AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
n
@ ao Stud
AND (t2.pg_featurevalue_01_id = t5.value_id)
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
z
AND (t1.period_id = t7.value_id)i l le this
)
c e loฺ use
/* Attribute Filters */
a r to
m e
AND ((t2.productgroup_id = 15520)
l e ( icens
AND (t1.productgroup_id = 15520) /* Push Down Filters */
i l
oZ l
AND (t2.pg_featurevalue_05_id IN (5446,5447))
e l
AND (t4.elementrange_id = 3091)

Marc AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))


AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t4.elementrange_id,
t5.elementgroup_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @135 Results in 49031 Ticks

Oracle Database 11g: New Features for Administrators 138


PROMPT @Statement 15
rem #execute dbms_application_info.set_module('DWH_TEST','15');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
ble
lu_pg_featurevalue_15 t3,
fe r a
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
ans
lu_elementgroup_rel t6,
n - t r
o
an
lu_elementrange_rel t5
WHERE
/* Attribute Joins */ s
ha deฺ
((t1.item_id = t2.item_id r )
ฺa Gui
/* Customizing Begin */ m
co ent
AND ฺ
t1.productgroup_id = t2.productgroup_id)
n
/* Customizing End */
@ ao Stud
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
z i l le this
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)

c e loฺ use
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
r to
AND (t1.period_id = t6.value_id)
a
)
m e
l e ( icens
/* Attribute Filters */
i l
oZ l
AND ((t2.productgroup_id = 15520)
e l
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Marc AND (t2.pg_featurevalue_01_id IN


(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @5 Results in 9625 Ticks

Oracle Database 11g: New Features for Administrators 139


PROMPT @Statement 16
rem #execute dbms_application_info.set_module('DWH_TEST','16');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,


'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
ble
FROM
fe r a
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
ans
lu_elementrange_rel t4,
n - t r
o
an
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins */ m
co ent
((t1.item_id = t2.item_id
n ฺ
/* Customizing Begin */
AND @ ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
z i l le this
c e loฺ use
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
r to
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
a
m e
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
l e ( icens
AND (t1.period_id = t6.value_id)
i l
oZ l
)
e l
/* Attribute Filters */

Marc AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8664,8665,8666,8667,8668,8669,8670,8671))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,

Oracle Database 11g: New Features for Administrators 140


t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @140 Results in 14219 Ticks

PROMPT @Statement 17
rem #execute dbms_application_info.set_module('DWH_TEST','17');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
ble
'r' || t5.elementrange_id price_eur_id,
fe r a
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
ans
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
n - t r
o
an
salesvalueeur
FROM
lu_item_293 t2, s
ha deฺ
lu_pg_featurevalue_15 t3, r )
ฺa Gui
lu_elementrange_rel t4, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t6,
lu_elementrange_rel t5 @ ao Stud
WHERE
z i l le this
/* Attribute Joins */
c e loฺ use
r
((t1.item_id = t2.item_id
a to
m
/* Customizing Begin */
e
AND
l e ( icens
t1.productgroup_id = t2.productgroup_id)
i l
oZ l
/* Customizing End */
e l
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

Marc AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)


AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY

Oracle Database 11g: New Features for Administrators 141


t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @353 Results in 41250 Ticks

PROMPT @Statement 18
rem #execute dbms_application_info.set_module('DWH_TEST','18');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
ble
'r' || t4.elementrange_id pg_featurevalue_15_id,
fe r a
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
ans
'r' || t5.elementrange_id price_eur_id,
n - t r
o
an
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
s
ha deฺ
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur r )
ฺa Gui
FROM m
co ent
lu_item_293 t2,
n ฺ
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4, @ ao Stud
fact_pd_out_itm_293 t1,
z i l le this
lu_elementgroup_rel t6,
c e loฺ use
r
lu_elementrange_rel t5
a to
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.item_id = t2.item_id
e l
/* Customizing Begin */

Marc AND t1.productgroup_id = t2.productgroup_id)


/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8658,8659,8660,8661,8662,8663,8664))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */

Oracle Database 11g: New Features for Administrators 142


)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @3 Results in 12578 Ticks

ble
fe r a
PROMPT @Statement 19
ans
rem #execute dbms_application_info.set_module('DWH_TEST','19');
n - t r
o
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
s an
'r' || t4.elementrange_id pg_featurevalue_15_id,
r ) ha deฺ
'r' || t5.elementrange_id price_eur_id, m ฺa Gui
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

'B' || t2.productgroup_id productgroup_id,


n ฺ co ent
'G' || t6.elementgroup_id period_id,
@ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
z i l le this
FROM
c e loฺ use
lu_item_293 t2,
a r to
m
lu_pg_featurevalue_15 t3,
e
l e ( icens
lu_elementrange_rel t4,
i l
oZ l
fact_pd_out_itm_293 t1,
e l
lu_elementgroup_rel t6,

Marc lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t6.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 143


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @118 Results in 41453 Ticks

ble
fe r a
PROMPT @Statement 20
ans
rem #execute dbms_application_info.set_module('DWH_TEST','20');
n - t r
o
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
s an
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
r ) ha deฺ
m
'r' || t4.elementrange_id pg_featurevalue_15_id,ฺa Gui
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

ฺ co ent
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
n
@ ao Stud
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
z i l le this
'B' || t2.productgroup_id productgroup_id,

c e loฺ use
'G' || t6.elementgroup_id period_id,
r to
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
a
salesvalueeur
m e
FROM
i l l e ( icens
oZ l
lu_item_293 t2,
e l
lu_pg_featurevalue_15 t3,

Marc lu_elementrange_rel t4,


fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))

Oracle Database 11g: New Features for Administrators 144


AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
ble
t2.pg_featurevalue_08_id,
fe r a
t2.pg_featurevalue_01_id,
t5.elementrange_id,
ans
t2.productgroup_id,
n - t r
t6.elementgroup_id
a no
/
PROMPT @0 Results in 4594 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
PROMPT @Statement 21
a on tud
l l e@ is S
rem #execute dbms_application_info.set_module('DWH_TEST','21');
i
ฺzUSE_HASH(t1) th */
SELECT /* ORDERED INDEX(t1)
l o s e
rce to u pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_02_id
a
( m s e
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,

i l l e icen
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' ||
l o Z l
t3.elementrange_id price_eur_id,
e
'B' || t2.productgroup_id productgroup_id,
arc 'G' || t4.elementgroup_id period_id,
M salesvalueeur
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))

Oracle Database 11g: New Features for Administrators 145


AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
ble
t2.pg_featurevalue_08_id,
fe r a
t3.elementrange_id,
t2.productgroup_id,
ans
t4.elementgroup_id
n - t r
/
a no
PROMPT @171 Results in 68984 Ticks
h a s ฺ
ฺ a r) uide
PROMPT @Statement 22 ฺ c om ent G
a on tud
rem #execute dbms_application_info.set_module('DWH_TEST','22');

l l e@ is*/S
i th
ฺz se pg_featurevalue_02_id,
SELECT /* ORDERED INDEX(t1) USE_HASH(t1)
l o
'B' || t2.pg_featurevalue_02_id
rce to u pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_15_id
a
( m s e
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,

'B' ||Z le licen


'r' || t3.elementrange_id
ilt2.productgroup_id
price_eur_id,
productgroup_id,
e l
'G' o || t4.elementgroup_id period_id,
arc SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
M salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))

Oracle Database 11g: New Features for Administrators 146


AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
)
)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
ble
AND (t4.elementgroup_id = 14659)
fe r a
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ans
ElementGroup Filters */
n - t r
o
an
)
/* Fact Filters */
AND (t1.project_type_id = '1' s
ha deฺ
) r )
ฺa Gui
GROUP BY m
co ent
t2.pg_featurevalue_02_id,
n ฺ
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id, @ ao Stud
t3.elementrange_id,
z i l le this
t2.productgroup_id,
c e loฺ use
t4.elementgroup_id
a r to
/
m e
l e ( icens
PROMPT @149 Results in 70531 Ticks
i l
el oZ l
r c
aPROMPT @Statement 23
M rem #execute dbms_application_info.set_module('DWH_TEST','23');
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */

Oracle Database 11g: New Features for Administrators 147


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
ble
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
fe r a
ElementGroup Filters */
)
ans
/* Fact Filters */
n - t r
AND (t1.project_type_id = '1'
a no
)
GROUP BY
h a s ฺ
t2.pg_featurevalue_13_id,
ฺ a r) uide
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id, ฺ c om ent G
t3.elementrange_id,
a on tud
t2.productgroup_id,
l l e@ is S
t4.elementgroup_id i
ฺz se th
/
l o
rce to u
PROMPT @1 Results in 4531 Ticks
a
l e (m ense
Zi l lic
PROMPTlo@Statement 24
a rce#execute dbms_application_info.set_module('DWH_TEST','24');
rem
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

Oracle Database 11g: New Features for Administrators 148


AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_15_id = 1484)
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_05_id = 5447)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
ble
AND (t1.period_id IN
fe r a
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ans
)
n - t r
o
an
/* Fact Filters */
AND (t1.project_type_id = '1'
) s
ha deฺ
GROUP BY r )
ฺa Gui
t2.pg_featurevalue_05_id, m
co ent
t2.pg_featurevalue_02_id,
n ฺ
t2.pg_featurevalue_15_id,
t3.elementrange_id, @ ao Stud
t2.productgroup_id,
z i l le this
t4.elementgroup_id
c e loฺ use
/
a r to
m
PROMPT @16 Results in 532 Ticks
e
i l l e ( icens
e loZ l
MarcPROMPT @Statement 25
rem #execute dbms_application_info.set_module('DWH_TEST','25');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id

Oracle Database 11g: New Features for Administrators 149


/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.period_id = t6.value_id)


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
ble
AND (t2.pg_featurevalue_05_id = 5447)
fe r a
AND (t4.elementrange_id = 3091)
AND (t5.elementrange_id IN
ans
n
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671 - t r
o
an
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659) s
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t2.pg_featurevalue_05_id,
e
l e ( icens
t2.pg_featurevalue_02_id,
i l
oZ l
t4.elementrange_id,
e l
t2.pg_featurevalue_08_id,

Marc t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @77 Results in 8219 Ticks

PROMPT @Statement 26
rem #execute dbms_application_info.set_module('DWH_TEST','26');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 150


lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953)) s
ha deฺ
AND (t4.elementrange_id IN r )
ฺa Gui
m
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
co ent
AND (t5.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t3.elementgroup_id,

Marc t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @20 Results in 15000 Ticks

PROMPT @Statement 27
rem #execute dbms_application_info.set_module('DWH_TEST','27');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 151


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
ble
/* Attribute Filters */
fe r a
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ans
AND (t2.pg_featurevalue_01_id IN
n - t r
o
an
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717)) s
ha deฺ
AND (t2.pg_featurevalue_13_id = 5424) r )
ฺa Gui
AND (t3.elementrange_id IN m
co ent

(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695
n
,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659) @ ao Stud
AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @313 Results in 42485 Ticks

PROMPT @Statement 28
rem #execute dbms_application_info.set_module('DWH_TEST','28');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 152


SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
ble
AND ((t2.productgroup_id = 15520)
fe r a
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
ans
n
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2 - t r
o
an
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447)) s
ha deฺ
AND (t3.elementrange_id IN r )
ฺa Gui
m
(8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
co ent
AND (t4.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t2.pg_featurevalue_05_id,

Marc t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 12641 Ticks

PROMPT @Statement 29
rem #execute dbms_application_info.set_module('DWH_TEST','29');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur

Oracle Database 11g: New Features for Administrators 153


FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN s
ha deฺ
r )
ฺa Gui
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673
,8674,8675,8676,8679)) m
co ent
AND (t4.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t2.pg_featurevalue_13_id,

Marc t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @318 Results in 42875 Ticks

PROMPT @Statement 30
rem #execute dbms_application_info.set_module('DWH_TEST','30');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM

Oracle Database 11g: New Features for Administrators 154


lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ble
AND (t2.pg_featurevalue_01_id IN
fe r a
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ans
AND (t2.pg_featurevalue_15_id IN (1481,1484))
n - t r
o
an
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
s
ha deฺ
(8671,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686))
AND (t4.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t2.pg_featurevalue_05_id,
i l
oZ l
t2.pg_featurevalue_15_id,
e l
t2.pg_featurevalue_01_id,

Marc t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @72 Results in 11703 Ticks

PROMPT @Statement 31
rem #execute dbms_application_info.set_module('DWH_TEST','31');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 155


lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953)) s
ha deฺ
AND (t4.elementrange_id IN r )
ฺa Gui
m
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
co ent
AND (t5.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t3.elementgroup_id,

Marc t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @103 Results in 14610 Ticks

PROMPT @Statement 32
rem #execute dbms_application_info.set_module('DWH_TEST','32');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

Oracle Database 11g: New Features for Administrators 156


FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN s
ha deฺ
r )
ฺa Gui
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671))
AND (t4.elementgroup_id = 14659) m
co ent
AND (t1.period_id IN
n ฺ
ElementGroup Filters */ @ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

)
z i l le this
/* Fact Filters */
c e loฺ use
r
AND (t1.project_type_id = '1'
a to
)
m e
GROUP BY
i l l e ( icens
oZ l
t2.pg_featurevalue_05_id,
e l
t2.pg_featurevalue_15_id,

Marc t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @299 Results in 11828 Ticks

PROMPT @Statement 33
rem #execute dbms_application_info.set_module('DWH_TEST','33');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM

Oracle Database 11g: New Features for Administrators 157


lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
ble
AND ((t2.productgroup_id = 15520)
fe r a
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
ans
n
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2 - t r
o
an
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485)) s
ha deฺ
AND (t3.elementgroup_id IN (1952,1953)) r )
ฺa Gui
AND (t4.elementrange_id IN m
co ent

(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
n
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
/* Fact Filters */
m e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @222 Results in 14875 Ticks

PROMPT @Statement 34
rem #execute dbms_application_info.set_module('DWH_TEST','34');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 158


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_08_id = 717) m
co ent

AND (t2.pg_featurevalue_15_id IN (12425,1485))
n
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN @ ao Stud
z i l le this
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))

c e loฺ use
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @127 Results in 15234 Ticks

PROMPT @Statement 35
rem #execute dbms_application_info.set_module('DWH_TEST','35');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 159


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ble
AND (t1.period_id = t4.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_15_id IN (1481,1484)) m
co ent

AND (t2.pg_featurevalue_05_id IN (5446,5447))
n
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659) @ ao Stud
AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 2281 Ticks

PROMPT @Statement 36
rem #execute dbms_application_info.set_module('DWH_TEST','36');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t5.elementgroup_id pg_featurevalue_31_id,
'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 160


SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_elementrange_rel t6
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ble
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
fe r a
AND (t2.pg_featurevalue_31_id = t5.value_id)
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
ans
AND (t1.period_id = t7.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_09_id IN (5484,5485)) m
co ent
AND (t5.elementgroup_id = 8597)
n ฺ
AND (t4.elementrange_id = 3106)
AND (t6.elementrange_id IN @ ao Stud
z i l le this
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671

c e loฺ use
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
r to
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
a
m e
AND (t7.elementgroup_id = 14659)
l e ( icens
AND (t1.period_id IN
i l
oZ l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
e l
ElementGroup Filters */

Marc )
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t4.elementrange_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @13 Results in 562 Ticks

PROMPT @Statement 37
rem #execute dbms_application_info.set_module('DWH_TEST','37');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 161


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
ans
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95)) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l
AND (t2.pg_featurevalue_08_id = 717)le this
c e loฺ use
AND (t2.pg_featurevalue_15_id IN (12425,1485))
r to
AND (t3.elementgroup_id IN (1952,1953))
a
m e
AND (t4.elementrange_id IN (8656,8657))
l e ( icens
AND (t5.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @1 Results in 3469 Ticks

PROMPT @Statement 38
rem #execute dbms_application_info.set_module('DWH_TEST','38');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */

Oracle Database 11g: New Features for Administrators 162


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'G' || t3.elementgroup_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_01_id = t3.value_id)
ans
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_13_id = 5424)
n ฺ
AND (t4.elementrange_id IN @ ao Stud
AND (t3.elementgroup_id IN (1959,1960,1961,1962,8574))

z i l le this
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671

c e loฺ use
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
r to
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
a
m e
AND (t5.elementgroup_id = 14659)
l e ( icens
AND (t1.period_id IN
i l
oZ l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
e l
ElementGroup Filters */

Marc )
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @172 Results in 76250 Ticks

PROMPT @Statement 39
rem #execute dbms_application_info.set_module('DWH_TEST','39');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_47_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 163


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_47_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */

OR s
AND NOT ((t2.pg_featurevalue_15_id IN (1474,1481,1483,1484)
ha deฺ
/* ElementGroup Subselect */ r )
ฺa Gui
( m
co ent
t2.pg_featurevalue_15_id IN
n ฺ
(SELECT g1.value_id
FROM @ ao Stud
lu_elementgroup_rel g1
WHERE
z i l le this
c e loฺ use
/* ElementGroup Filters */
r to
(g1.elementgroup_id = 8507)
a
)
m e
i l l
) e ( icens
oZ l
OR
e l /* ElementRange Subselect */

Marc t2.pg_featurevalue_15_id IN
(SELECT r1.pg_featurevalue_15_id
FROM lu_pg_featurevalue_15 r1,
lu_elementrange_rel r2
WHERE
/* Feature Filter */
(r1.pg_feature_15_id = 977)
/* Attribute Join */
AND (r1.pg_featurevalue_15_num BETWEEN r2.lbound AND r2.ubound)
/* ElementRange Filter */
AND (r2.elementrange_id = 5783)
)
)
)
AND (t3.elementgroup_id = 6624)
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 164


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @8 Results in 2781 Ticks

ble
fe r a
PROMPT @Statement 40
rem #execute dbms_application_info.set_module('DWH_TEST','40');
ans
n - t r
o
an
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'r' || t3.elementrange_id price_eur_id, s
ha deฺ
'B' || t2.productgroup_id productgroup_id, r )
ฺa Gui
'G' || t4.elementgroup_id period_id, m
co ent

SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
n
FROM
lu_item_293 t2, @ ao Stud
fact_pd_out_itm_293 t1,
z i l le this
lu_elementgroup_rel t4,
c e loฺ use
r
lu_elementrange_rel t3
a to
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.item_id = t2.item_id
e l
/* Customizing Begin */

Marc AND t1.productgroup_id = t2.productgroup_id)


/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
)
)

Oracle Database 11g: New Features for Administrators 165


AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementrange_id,
t2.productgroup_id,
ble
t4.elementgroup_id
fe r a
/
PROMPT @40 Results in 92391 Ticks
ans
n - t r
a no
PROMPT @Statement 41
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','41');

SELECT ฺ c om ent G
a on ch_featurevalue_02_id,
tud
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id @ S
le this pg_featurevalue_15_id,
z i l
'r' || tt1.pg_featurevalue_15_elrg_id

c e loฺ use countrychannel_id,


'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
r to productgroup_id,
'G' || tt1.countrychannel_elgr_id
a
m
'B' || tt1.productgroup_id
e
l e ( icens period_id,
'G' || tt1.period_elgr_id
i l
l o Z l
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,

r c eSUM(tt1.distributionfactor*tt1.dissalesflag)
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,

Ma SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
selloutletsavg,

FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
t8.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,

Oracle Database 11g: New Features for Administrators 166


SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
ble
lu_elementgroup_rel t8,
fe r a
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
ans
lu_elementgroup_rel t9,
n - t r
o
an
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins */ m
co ent
((t1.outlet_id = t2.outlet_id
n ฺ
/* Customizing Begin */
AND t1.period_id = t2.period_id @ ao Stud
AND
z i l le this
t1.project_id = t2.project_id)
/* Customizing End */
c e loฺ use
r to
AND (t2.ch_featurevalue_02_id = t3.value_id)
a
m e
AND (t2.country_channel_id = t4.value_id)
l e ( icens
AND (t1.item_id = t5.item_id
i l
oZ l
/* Customizing Begin */
e lAND t1.productgroup_id = t5.productgroup_id)

Marc /* Customizing End */


AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)

Oracle Database 11g: New Features for Administrators 167


/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND t1.project_type_id = '1'


)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t7.elementrange_id,
t8.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id,
t9.elementgroup_id,
ble
t2.outlet_id,
fe r a
t1.project_id,
/* Additional GroupBys Begin */
ans
t1.project_id, t1.period_id, t1.outlet_id
n - t r
o
an
/* Additional GroupBys End */
) tt1
GROUP BY s
ha deฺ
tt1.ch_featurevalue_09_id, r )
ฺa Gui
tt1.ch_featurevalue_02_elgr_id, m
co ent
tt1.pg_featurevalue_15_elrg_id,
n ฺ
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id, @ ao Stud
tt1.productgroup_id,
z i l le this
tt1.period_elgr_id
c e loฺ use
/
a r to
m e
PROMPT @32 Results in 3140 Ticks

i l l e ( icens
e loZ l
MarcPROMPT @Statement 42
rem #execute dbms_application_info.set_module('DWH_TEST','42');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'G' || tt1.pg_featurevalue_13_elgr_id pg_featurevalue_13_id,
'B' || tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */

Oracle Database 11g: New Features for Administrators 168


t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t6.elementgroup_id pg_featurevalue_13_elgr_id,
t5.pg_featurevalue_15_id pg_featurevalue_15_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.elementgroup_id countrychannel_elgr_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
ble
MAX(t1.pd_distribution_factor) distributionfactor,
fe r a
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
ans
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n - t r
o
an
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +

/* Additional Columns Begin */ s


ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
ha deฺ
r )
ฺa Gui
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d m
co ent
/* Additional Columns End */
n ฺ
FROM
lu_item_293 t5, @ ao Stud
lu_elementgroup_rel t6,
z i l le this
c e loฺ use
fact_pd_out_itm_293 t1,
r
lu_elementgroup_rel t7,
a to
m
lu_outlet_293 t2,
e
l e ( icens
lu_elementgroup_rel t3,
i l
oZ l
lu_elementgroup_rel t4
e l
WHERE

Marc /* Attribute Joins */


((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_13_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t5.pg_featurevalue_08_id = 717)

Oracle Database 11g: New Features for Administrators 169


AND (t5.pg_featurevalue_15_id IN (12425,1485))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1952,1953))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
ble
AND t1.project_type_id = '1'
fe r a
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ans
AND t1.project_type_id = '1'
n - t r
o
an
)
GROUP BY
t2.ch_featurevalue_09_id, s
ha deฺ
t3.elementgroup_id, r )
ฺa Gui
t6.elementgroup_id, m
co ent
t5.pg_featurevalue_15_id,
n ฺ
t5.pg_featurevalue_08_id,
t4.elementgroup_id, @ ao Stud
t5.productgroup_id,
z i l le this
t7.elementgroup_id,
c e loฺ use
t2.outlet_id,
a r to
m
t1.project_id,
e
l e ( icens
/* Additional GroupBys Begin */
i l
oZ l
t1.project_id, t1.period_id, t1.outlet_id
e l /* Additional GroupBys End */

Marc ) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_13_elgr_id,
tt1.pg_featurevalue_15_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @6 Results in 516 Ticks

PROMPT @Statement 43
rem #execute dbms_application_info.set_module('DWH_TEST','43');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,

Oracle Database 11g: New Features for Administrators 170


'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
ble
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
fe r a
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_05_id pg_featurevalue_05_id,
ans
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
n - t r
o
an
t7.elementrange_id pg_featurevalue_15_elrg_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.elementgroup_id countrychannel_elgr_id, s
ha deฺ
t5.productgroup_id productgroup_id, r )
ฺa Gui
t8.elementgroup_id period_elgr_id, m
co ent
t2.outlet_id outlet_id,
n ฺ
t1.project_id project_id,
@ ao Stud
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
z i l le this
c e loฺ use
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
r to
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
a
m e
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
l e ( icens
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
i l
oZ l
MAX(t1.pd_distribution_factor) distributionfactor,
e l SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))

Marcdissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id

Oracle Database 11g: New Features for Administrators 171


AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND t1.productgroup_id = t5.productgroup_id)


/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
ble
AND (t5.pg_featurevalue_02_id IN (4165,4166))
fe r a
AND (t5.pg_featurevalue_05_id = 5447)
AND (t2.ch_featurevalue_09_id = 7379)
ans
AND (t3.elementgroup_id IN (3481,3482))
n - t r
o
an
AND (t7.elementrange_id = 3091)
AND NOT ((/* ElementGroup Subselect */
( s
ha deฺ
t5.pg_featurevalue_01_id IN r )
ฺa Gui
(SELECT g1.value_id m
co ent
FROM ฺ
lu_elementgroup_rel g1
n
WHERE
@ ao Stud
/* ElementGroup Filters */
z i l le this
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
c e loฺ use
)
a r to
)
m e
i
)
l l e ( icens
oZ l
AND (t4.elementgroup_id = 14786)
e lAND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup

MarcFilters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t8.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_02_id,
t7.elementrange_id,
t5.pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 172


t4.elementgroup_id,
t5.productgroup_id,
t8.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t1.project_id, t1.period_id, t1.outlet_id


/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_08_id,
ble
tt1.countrychannel_elgr_id,
fe r a
tt1.productgroup_id,
tt1.period_elgr_id
ans
/
n - t r
PROMPT @8 Results in 2093 Ticks
a no
h a s ฺ
ฺ a r) uide
PROMPT @Statement 44
ฺ c om ent G
rem #execute dbms_application_info.set_module('DWH_TEST','44');
a on tud
SELECT
l e i s S
@ ch_featurevalue_09_id,
i l h
ฺz se t ch_featurevalue_02_id,
'B' || tt1.ch_featurevalue_09_id
l o
'G' || tt1.ch_featurevalue_02_elgr_id
e u
a rc t o
'G' || tt1.pg_featurevalue_13_elgr_id pg_featurevalue_13_id,

l e (m ense
'B' || tt1.pg_featurevalue_15_id
'B' || tt1.pg_featurevalue_08_id
pg_featurevalue_15_id,
pg_featurevalue_08_id,
'G' ||Z i l li c
tt1.countrychannel_elgr_id countrychannel_id,
e l
'B' o || tt1.productgroup_id productgroup_id,

Marc 'G' || tt1.period_elgr_id period_id,


SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t6.elementgroup_id pg_featurevalue_13_elgr_id,
t5.pg_featurevalue_15_id pg_featurevalue_15_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,

Oracle Database 11g: New Features for Administrators 173


SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
ble
FROM
fe r a
lu_item_293 t5,
lu_elementgroup_rel t6,
ans
fact_pd_out_itm_293 t1,
n - t r
o
an
lu_elementgroup_rel t7,
lu_outlet_293 t2,
lu_elementgroup_rel t3, s
ha deฺ
lu_elementgroup_rel t4 r )
ฺa Gui
WHERE m
co ent
/* Attribute Joins */
n ฺ
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */ @ ao Stud
AND
z i l le this
t1.period_id = t2.period_id
AND
loฺ use
t1.project_id = t2.project_id)
c e
r
/* Customizing End */
a to
m e
AND (t2.ch_featurevalue_02_id = t3.value_id)
l e ( icens
AND (t2.country_channel_id = t4.value_id)
i l
oZ l
AND (t1.item_id = t5.item_id
e l
/* Customizing Begin */

Marc AND t1.productgroup_id = t5.productgroup_id)


/* Customizing End */
AND (t5.pg_featurevalue_13_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id = 717)
AND (t5.pg_featurevalue_15_id IN (12425,1485))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1952,1953))
AND NOT ((/* ElementGroup Subselect */
(
t5.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)

Oracle Database 11g: New Features for Administrators 174


)
)
)
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */


AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ble
AND t1.project_type_id = '1'
fe r a
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ans
)
n - t r
o
an
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id, s
ha deฺ
t6.elementgroup_id, r )
ฺa Gui
t5.pg_featurevalue_15_id, m
co ent
t5.pg_featurevalue_08_id,
n ฺ
t4.elementgroup_id,
t5.productgroup_id, @ ao Stud
t7.elementgroup_id,
z i l le this
t2.outlet_id,
c e loฺ use
t1.project_id,
a r to
m e
/* Additional GroupBys Begin */
l e ( icens
t1.project_id, t1.period_id, t1.outlet_id
i l
oZ l
/* Additional GroupBys End */
e l
) tt1

MarcGROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_13_elgr_id,
tt1.pg_featurevalue_15_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @6 Results in 1296 Ticks

PROMPT @Statement 45
rem #execute dbms_application_info.set_module('DWH_TEST','45');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 175


'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
ble
t6.elementgroup_id pg_featurevalue_01_elgr_id,
fe r a
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
ans
t7.elementgroup_id period_elgr_id,
n - t r
o
an
t2.outlet_id outlet_id,
t1.project_id project_id,
s
ha deฺ
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales, r )
ฺa Gui
m
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
co ent

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n
@ ao Stud
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
z i l le this
MAX(t1.pd_distribution_factor) distributionfactor,

c e loฺ use
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
a r to
m e
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
l e ( icens
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
i l
oZ l
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
e l /* Additional Columns Begin */

Marc t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id


outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_elementgroup_rel t6,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */

Oracle Database 11g: New Features for Administrators 176


AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_01_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t5.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_02_id = 4165)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
ble
AND (t7.elementgroup_id = 14659)
fe r a
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ans
ElementGroup Filters */
n - t r
o
an
)
/* Fact Filters */
AND (t1.project_type_id = '1' s
ha deฺ
AND t1.project_type_id = '1' r )
ฺa Gui
AND t1.project_type_id = '1' m
co ent
AND t1.project_type_id = '1'
n ฺ
AND t1.project_type_id = '1'
AND t1.project_type_id = '1' @ ao Stud
)
z i l le this
GROUP BY
c e loฺ use
r to
t2.ch_featurevalue_09_id,
a
m
t3.elementgroup_id,
e
l e ( icens
t5.pg_featurevalue_02_id,
i l
oZ l
t6.elementgroup_id,
e l t4.elementgroup_id,

Marc t5.productgroup_id,
t7.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @10 Results in 1188 Ticks

PROMPT @Statement 46

Oracle Database 11g: New Features for Administrators 177


rem #execute dbms_application_info.set_module('DWH_TEST','46');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || tt1.countrychannel_elgr_id countrychannel_id,


'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
ble
--------------------------
fe r a
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
ans
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
n - t r
o
an
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.elementgroup_id countrychannel_elgr_id, s
ha deฺ
t5.productgroup_id productgroup_id, r )
ฺa Gui
t6.elementgroup_id period_elgr_id, m
co ent
t2.outlet_id outlet_id,
n ฺ
t1.project_id project_id,
@ ao Stud
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
z i l le this
c e loฺ use
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
r to
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
a
m e
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
l e ( icens
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
i l
oZ l
MAX(t1.pd_distribution_factor) distributionfactor,
e l SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))

Marcdissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 178


AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.period_id = t6.value_id)


)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t2.ch_featurevalue_09_id = 7379)
ble
AND (t3.elementgroup_id IN (3481,3482))
fe r a
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
ans
Filters */
n - t r
o
an
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN s
ha deฺ
r )
ฺa Gui
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ m
co ent
)
n ฺ
/* Fact Filters */
AND (t1.project_type_id = '1' @ ao Stud
z
AND t1.project_type_id = '1'i l le this
c e loฺ use
AND t1.project_type_id = '1'
r to
AND t1.project_type_id = '1'
a
m e
AND t1.project_type_id = '1'
l e ( icens
AND t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t6.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @4 Results in 640 Ticks

Oracle Database 11g: New Features for Administrators 179


PROMPT @Statement 47
rem #execute dbms_application_info.set_module('DWH_TEST','47');

SELECT
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,


'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || tt1.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
ble
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
fe r a
FROM
--------------------------
ans
-- TempTable 1
n - t r
o
an
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */ s
ha deฺ
r )
ฺa Gui
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
m
t3.elementgroup_id ch_featurevalue_02_elgr_id,
co ent

t5.pg_featurevalue_08_id pg_featurevalue_08_id,
n
@ ao Stud
t5.pg_featurevalue_01_id pg_featurevalue_01_id,
t4.elementgroup_id countrychannel_elgr_id,
z i l le this
t5.productgroup_id productgroup_id,

c e loฺ use
t6.elementgroup_id period_elgr_id,
r
t2.outlet_id outlet_id,
a to
m e
t1.project_id project_id,
l e ( icens
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
i l
oZ l
dnfactorsales,
e l MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,

Marc SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */

Oracle Database 11g: New Features for Administrators 180


((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.country_channel_id = t4.value_id)


AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ble
AND (t5.pg_featurevalue_01_id IN
fe r a
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ans
AND (t5.pg_featurevalue_08_id IN (716,717))
n - t r
o
an
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786) s
ha deฺ
r )
ฺa Gui
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */ m
co ent

AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
n
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
m
/* Fact Filters */
e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
AND t1.project_type_id = '1'
e lAND t1.project_type_id = '1'

Marc AND t1.project_type_id = '1'


AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_08_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id,
t5.productgroup_id,
t6.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 181


tt1.pg_featurevalue_01_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @68 Results in 2391 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 48
rem #execute dbms_application_info.set_module('DWH_TEST','48');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'G' || tt1.pg_featurevalue_47_elgr_id pg_featurevalue_47_id,
ble
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
fe r a
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
ans
'G' || tt1.period_elgr_id period_id,
n - t r
o
an
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
s
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
ha deฺ
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
r )
ฺa Gui
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM m
co ent
--------------------------
n ฺ
-- TempTable 1
-------------------------- @ ao Stud
(
z i l le this
c e loฺ use
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
r to
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
a
m e
t3.elementgroup_id ch_featurevalue_02_elgr_id,
l e ( icens
t8.elementgroup_id pg_featurevalue_47_elgr_id,
i l
oZ l
t7.elementrange_id pg_featurevalue_15_elrg_id,
e l t4.elementgroup_id countrychannel_elgr_id,

Marc t5.productgroup_id productgroup_id,


t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,

Oracle Database 11g: New Features for Administrators 182


lu_pg_featurevalue_15 t6,
lu_elementgroup_rel t8,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t9,
lu_outlet_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
ble
AND (t2.country_channel_id = t4.value_id)
fe r a
AND (t1.item_id = t5.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t5.productgroup_id)
n - t r
o
an
/* Customizing End */
s
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
ha deฺ
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_47_id = t8.value_id) r )
ฺa Gui
AND (t1.period_id = t9.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t5.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND (t2.ch_featurevalue_09_id = 7379)
r to
AND (t3.elementgroup_id IN (3481,3482))
a
m e
AND (t8.elementgroup_id = 6624)
l e ( icens
AND (t7.elementrange_id = 5783)
i l
oZ l
AND (t4.elementgroup_id = 14786)
e lAND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup

MarcFilters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t8.elementgroup_id,
t7.elementrange_id,
t4.elementgroup_id,
t5.productgroup_id,

Oracle Database 11g: New Features for Administrators 183


t9.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_47_elgr_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
ble
PROMPT @2 Results in 719 Ticks
fe r a
ans
n - t r
PROMPT @Statement 49
a no
rem #execute dbms_application_info.set_module('DWH_TEST','49');
h a s ฺ
SELECT
ฺ a r) uide
ฺ c om ent G
'G' || tt1.pg_featurevalue_31_elgr_id pg_featurevalue_31_id,
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id
a on ch_featurevalue_02_id,
tud
'B' || tt1.pg_featurevalue_15_id @ S
pg_featurevalue_15_id,
le thcountrychannel_id,
is
z
'G' || tt1.countrychannel_elgr_idi l
'B' || tt1.productgroup_id
c e loฺ period_id,
se
productgroup_id,
u
r
'G' || tt1.period_elgr_id
a to
( m s e
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,

i l l e icen
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,

l o Z l
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,

r c e
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg

Ma --------------------------
FROM

-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t4) */
t3.elementgroup_id pg_featurevalue_31_elgr_id,
t4.ch_featurevalue_09_id ch_featurevalue_09_id,
t5.elementgroup_id ch_featurevalue_02_elgr_id,
t2.pg_featurevalue_15_id pg_featurevalue_15_id,
t6.elementgroup_id countrychannel_elgr_id,
t2.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t4.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,

Oracle Database 11g: New Features for Administrators 184


SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id


outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_outlet_293 t4,
lu_elementgroup_rel t6,
ble
lu_elementgroup_rel t5
fe r a
WHERE
/* Attribute Joins */
ans
((t1.item_id = t2.item_id
n - t r
o
an
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ s
ha deฺ
AND (t2.pg_featurevalue_31_id = t3.value_id) r )
ฺa Gui
AND (t1.outlet_id = t4.outlet_id m
co ent
/* Customizing Begin */
n ฺ
AND
AND
t1.period_id = t4.period_id
@
t1.project_id = t4.project_id)ao Stud
/* Customizing End */
z i l le this
c e loฺ use
AND (t4.ch_featurevalue_02_id = t5.value_id)
r to
AND (t4.country_channel_id = t6.value_id)
a
m e
AND (t1.period_id = t7.value_id)

i
)
l l e ( icens
oZ l
/* Attribute Filters */
e lAND ((t2.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_15_id = 1484)
AND (t4.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (8596,8597))
AND (t5.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id = 14786)
AND (t4.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 185


GROUP BY
t3.elementgroup_id,
t4.ch_featurevalue_09_id,
t5.elementgroup_id,
t2.pg_featurevalue_15_id,
t6.elementgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.productgroup_id,
t7.elementgroup_id,
t4.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.pg_featurevalue_31_elgr_id,
ble
tt1.ch_featurevalue_09_id,
fe r a
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_id,
ans
tt1.countrychannel_elgr_id,
n - t r
tt1.productgroup_id,
a no
/
tt1.period_elgr_id
h a s ฺ
PROMPT @3 Results in 500 Ticks
ฺ a r) uide
ฺ c om ent G
a on tud
PROMPT @Statement 50
l l e@ is S
i
ฺz se th
rem #execute dbms_application_info.set_module('DWH_TEST','50');
l o
SELECT
a rce to u ch_featurevalue_09_id,
l (m ense
'B' || tt1.ch_featurevalue_09_id
e
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' ||Z i l li c
tt1.pg_featurevalue_09_id pg_featurevalue_09_id,
e l
'G' o || tt1.countrychannel_elgr_id countrychannel_id,

Marc 'B' || tt1.productgroup_id productgroup_id,


'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_09_id pg_featurevalue_09_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t6.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,

Oracle Database 11g: New Features for Administrators 186


MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t6,
lu_outlet_293 t2,
ans
lu_elementgroup_rel t4,
n - t r
o
an
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */ s
ha deฺ
((t1.outlet_id = t2.outlet_id r )
ฺa Gui
/* Customizing Begin */ m
co ent
AND t1.period_id = t2.period_id
n ฺ
AND t1.project_id = t2.project_id)
/* Customizing End */ @ ao Stud
z i l le this
AND (t2.ch_featurevalue_02_id = t3.value_id)

c e loฺ use
AND (t2.country_channel_id = t4.value_id)
r to
AND (t1.item_id = t5.item_id
a
m
/* Customizing Begin */
e
AND
i l l e ( icens
t1.productgroup_id = t5.productgroup_id)

oZ l
/* Customizing End */
e lAND (t1.period_id = t6.value_id)

Marc )
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_09_id IN (5484,5485))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'

Oracle Database 11g: New Features for Administrators 187


AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_09_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t4.elementgroup_id,
t5.productgroup_id,
t6.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
ble
tt1.ch_featurevalue_09_id,
fe r a
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_09_id,
ans
tt1.countrychannel_elgr_id,
n - t r
tt1.productgroup_id,
a no
/
tt1.period_elgr_id
h a s ฺ
PROMPT @4 Results in 3938 Ticks
ฺ a r) uide
ฺ c om ent G
a on tud
PROMPT @Statement 51
l l e@ is S
i
ฺz se th
rem #execute dbms_application_info.set_module('DWH_TEST','51');
l o
rce tUSE_HASH(t1)
SELECT /* ORDERED INDEX(t1)
a o u */

l e (m ense
'r' || t4.elementrange_id
'B' || t2.pg_featurevalue_10_id
pg_featurevalue_15_id,
pg_featurevalue_10_id,
'r' ||Z i l li c
t5.elementrange_id price_eur_id,
e l
'B' o || t2.productgroup_id productgroup_id,
arc 'G' || t6.elementgroup_id period_id,
M FROMSUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)

Oracle Database 11g: New Features for Administrators 188


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_10_id IN (705,706,707))
AND (t4.elementrange_id = 3091)
AND (t5.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
ble
t4.elementrange_id,
fe r a
t2.pg_featurevalue_10_id,
t5.elementrange_id,
ans
t2.productgroup_id,
n - t r
t6.elementgroup_id
a no
/
PROMPT @78 Results in 71969 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
PROMPT @Statement 52
a on tud
l l e@ is S
rem #execute dbms_application_info.set_module('DWH_TEST','52');
i
ฺz se th
SELECT
l o
rce to u ch_featurevalue_09_id,
'B' || tt1.ch_featurevalue_09_id
a
( m s e
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,

'B' ||Z le licen


'B' || tt1.pg_featurevalue_05_id
iltt1.pg_featurevalue_08_id
pg_featurevalue_05_id,
pg_featurevalue_08_id,
e l
'G' o || tt1.countrychannel_elgr_id countrychannel_id,

Marc 'B' || tt1.productgroup_id productgroup_id,


'G' || tt1.period_elgr_id period_id,
SUM(tt1.stocknewunits) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT
tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
tt1.countrychannel_elgr_id countrychannel_elgr_id,
tt1.productgroup_id productgroup_id,
tt1.period_elgr_id period_elgr_id,
tt1.periodicity_id periodicity_id,
MAX(tt1.stocknewunits_periodicity) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------

Oracle Database 11g: New Features for Administrators 189


(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_05_id pg_featurevalue_05_id,
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t6.periodicity_id periodicity_id,
FIRST_VALUE(SUM(t1.pd_stock_new_units*t1.pd_projection_factor)) OVER
(PARTITION BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_08_id,
ble
t4.elementgroup_id,
fe r a
t5.productgroup_id,
t7.elementgroup_id,
ans
t6.periodicity_id
n - t r
o
an
ORDER BY t1.period_id DESC ROWS UNBOUNDED PRECEDING)
stocknewunits_periodicity,
/* Additional Columns Begin */ s
ha deฺ
t1.period_id period_id_s r )
ฺa Gui
/* Additional Columns End */ m
co ent
FROM
n ฺ
lu_item_293 t5,
lu_period_293 t6, @ ao Stud
z i
lu_elementgroup_rel t7, l le this
c e loฺ use
fact_pd_out_itm_293 t1,
r
lu_outlet_293 t2,
a to
m e
lu_elementgroup_rel t4,

i l l e ( icens
lu_elementgroup_rel t3

oZ l
WHERE
e l /* Attribute Joins */

Marc ((t1.outlet_id = t2.outlet_id


/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.period_id)
AND (t6.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id = 717)
AND (t5.pg_featurevalue_05_id IN (5446,5447))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)

Oracle Database 11g: New Features for Administrators 190


AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t6.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Push Down
Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
ble
t3.elementgroup_id,
fe r a
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_08_id,
ans
t4.elementgroup_id,
n - t r
o
an
t5.productgroup_id,
t7.elementgroup_id,
t6.periodicity_id, s
ha deฺ
/* Additional GroupBys Begin */ r )
ฺa Gui
t1.period_id m
co ent
/* Additional GroupBys End */
n ฺ
) tt1
GROUP BY @ ao Stud
z
tt1.ch_featurevalue_09_id,i l le this
c e loฺ use
tt1.ch_featurevalue_02_elgr_id,
r to
tt1.pg_featurevalue_05_id,
a
m e
tt1.pg_featurevalue_08_id,
l e ( icens
tt1.countrychannel_elgr_id,
i l
oZ l
tt1.productgroup_id,
e l tt1.period_elgr_id,

Marc tt1.periodicity_id
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @4 Results in 2110 Ticks

PROMPT @Statement 53
rem #execute dbms_application_info.set_module('DWH_TEST','53');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,

Oracle Database 11g: New Features for Administrators 191


'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
ble
t3.elementgroup_id ch_featurevalue_02_elgr_id,
fe r a
t5.pg_featurevalue_05_id pg_featurevalue_05_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
ans
t5.pg_featurevalue_08_id pg_featurevalue_08_id,
n - t r
o
an
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t8.elementgroup_id period_elgr_id, s
ha deฺ
t2.outlet_id outlet_id, r )
ฺa Gui
t1.project_id project_id, m
co ent

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
n
dnfactorsales,
@ ao Stud
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
z i l le this
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +

c e loฺ use
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
r to
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
a
m e
MAX(t1.pd_distribution_factor) distributionfactor,
l e ( icens
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
i l
oZ l
dissalesflag,
e l SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +

MarcABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 192


AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)


AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_05_id IN (5446,5447))
AND (t2.ch_featurevalue_09_id = 7379)
ble
AND (t3.elementgroup_id IN (3481,3482))
fe r a
AND (t7.elementrange_id IN (3091,6115))
AND (t4.elementgroup_id = 14786)
ans
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
n - t r
o
an
Filters */

AND (t8.elementgroup_id = 14659) s


AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
z i
AND (t1.project_type_id = '1' l le this
c e loฺ use
AND t1.project_type_id = '1'
r to
AND t1.project_type_id = '1'
a
m e
AND t1.project_type_id = '1'
l e ( icens
AND t1.project_type_id = '1'
i l
oZ l
AND t1.project_type_id = '1'
e l )

Marc GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t7.elementrange_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t8.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,

Oracle Database 11g: New Features for Administrators 193


tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @11 Results in 4282 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 54
rem #execute dbms_application_info.set_module('DWH_TEST','54');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
ble
'B' || tt1.pg_featurevalue_01_id pg_featurevalue_01_id,
fe r a
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
ans
'G' || tt1.period_elgr_id period_id,
n - t r
o
an
SUM(tt1.stocknewunits) stocknewunits
FROM
-------------------------- s
ha deฺ
-- TempTable 1 r )
ฺa Gui
-------------------------- m
co ent
(
n ฺ
SELECT
@ ao Stud
tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
z i l le this
tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_elgr_id,

c e loฺ use
tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
r to
tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
a
m e
tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
l e ( icens
tt1.pg_featurevalue_01_id pg_featurevalue_01_id,
i l
oZ l
tt1.countrychannel_elgr_id countrychannel_elgr_id,
e l tt1.productgroup_id productgroup_id,

Marc tt1.period_elgr_id period_elgr_id,


tt1.periodicity_id periodicity_id,
MAX(tt1.stocknewunits_periodicity) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_05_id pg_featurevalue_05_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t5.pg_featurevalue_15_id pg_featurevalue_15_id,
t5.pg_featurevalue_01_id pg_featurevalue_01_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t6.periodicity_id periodicity_id,
FIRST_VALUE(SUM(t1.pd_stock_new_units*t1.pd_projection_factor)) OVER
(PARTITION BY
t2.ch_featurevalue_09_id,

Oracle Database 11g: New Features for Administrators 194


t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_02_id,
t5.pg_featurevalue_15_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.productgroup_id,
t7.elementgroup_id,
t6.periodicity_id
ORDER BY t1.period_id DESC ROWS UNBOUNDED PRECEDING)
stocknewunits_periodicity,
/* Additional Columns Begin */
t1.period_id period_id_s
/* Additional Columns End */
FROM
lu_item_293 t5,
ble
lu_period_293 t6,
fe r a
lu_elementgroup_rel t7,
fact_pd_out_itm_293 t1,
ans
lu_outlet_293 t2,
n - t r
o
an
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE s
ha deฺ
/* Attribute Joins */ r )
ฺa Gui
((t1.outlet_id = t2.outlet_id m
co ent
/* Customizing Begin */
n ฺ
AND
AND @ ao Stud
t1.period_id = t2.period_id
t1.project_id = t2.project_id)
/* Customizing End */
z i l le this
c e loฺ use
AND (t2.ch_featurevalue_02_id = t3.value_id)
r to
AND (t2.country_channel_id = t4.value_id)
a
m e
AND (t1.item_id = t5.item_id
l e ( icens
/* Customizing Begin */
i l
oZ l
AND t1.productgroup_id = t5.productgroup_id)
e l /* Customizing End */

Marc AND (t1.period_id = t6.period_id)


AND (t6.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t5.pg_featurevalue_15_id = 1484)
AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t5.pg_featurevalue_05_id = 5447)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t6.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */

Oracle Database 11g: New Features for Administrators 195


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Push Down
Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_02_id,
t5.pg_featurevalue_15_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id,
t5.productgroup_id,
ble
t7.elementgroup_id,
fe r a
t6.periodicity_id,
/* Additional GroupBys Begin */
ans
t1.period_id
n - t r
o
an
/* Additional GroupBys End */
) tt1
GROUP BY s
ha deฺ
tt1.ch_featurevalue_09_id, r )
ฺa Gui
tt1.ch_featurevalue_02_elgr_id, m
co ent
tt1.pg_featurevalue_05_id,
n ฺ
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_15_id, @ ao Stud
z
tt1.pg_featurevalue_01_id,i l le this
c e loฺ use
tt1.countrychannel_elgr_id,
r
tt1.productgroup_id,
a to
m
tt1.period_elgr_id,
e
l e ( icens
tt1.periodicity_id
i l
oZ l
) tt1
e l
GROUP BY

Marc tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_15_id,
tt1.pg_featurevalue_01_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @31 Results in 516 Ticks

PROMPT @Statement 55
rem #execute dbms_application_info.set_module('DWH_TEST','55');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 196


'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.stocknewunits) stocknewunits
FROM
--------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- TempTable 1
--------------------------
(
SELECT
tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_13_id pg_featurevalue_13_id,
tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
tt1.countrychannel_elgr_id countrychannel_elgr_id,
tt1.productgroup_id productgroup_id,
ble
tt1.period_elgr_id period_elgr_id,
fe r a
tt1.periodicity_id periodicity_id,
MAX(tt1.stocknewunits_periodicity) stocknewunits
ans
FROM
n - t r
o
an
--------------------------
-- TempTable 1
-------------------------- s
ha deฺ
( r )
ฺa Gui
m
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
co ent

t2.ch_featurevalue_09_id ch_featurevalue_09_id,
n
@ ao Stud
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_13_id pg_featurevalue_13_id,
z i l le this
t5.pg_featurevalue_08_id pg_featurevalue_08_id,

c e loฺ use
t4.elementgroup_id countrychannel_elgr_id,
r to
t5.productgroup_id productgroup_id,
a
m e
t7.elementgroup_id period_elgr_id,

i l l e ( icens
t6.periodicity_id periodicity_id,

oZ l
FIRST_VALUE(SUM(t1.pd_stock_new_units*t1.pd_projection_factor)) OVER
e l
(PARTITION BY

Marc t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_13_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t7.elementgroup_id,
t6.periodicity_id
ORDER BY t1.period_id DESC ROWS UNBOUNDED PRECEDING)
stocknewunits_periodicity,
/* Additional Columns Begin */
t1.period_id period_id_s
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_period_293 t6,
lu_elementgroup_rel t7,
fact_pd_out_itm_293 t1,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE

Oracle Database 11g: New Features for Administrators 197


/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.ch_featurevalue_02_id = t3.value_id)


AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.period_id)
AND (t6.period_id = t7.value_id)
)
/* Attribute Filters */
ble
AND ((t5.productgroup_id = 15520)
fe r a
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t5.pg_featurevalue_01_id IN
ans
n
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2 - t r
o
an
97,3891,71,76,89,92,95)))
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_13_id = 5424) s
ha deฺ
AND (t2.ch_featurevalue_09_id = 7379) r )
ฺa Gui
AND (t3.elementgroup_id IN (3481,3482)) m
co ent
AND (t4.elementgroup_id = 14786)
n ฺ
Filters */ @ ao Stud
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup

z i l le this
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */

c e loฺ use
AND (t7.elementgroup_id = 14659)
r
AND (t6.period_id IN
a to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Push Down

MarcFilters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_13_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t7.elementgroup_id,
t6.periodicity_id,
/* Additional GroupBys Begin */
t1.period_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_13_id,

Oracle Database 11g: New Features for Administrators 198


tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id,
tt1.periodicity_id
) tt1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_13_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @4 Results in 406 Ticks
ble
fe r a
ans
PROMPT @Statement 56
n - t r
rem #execute dbms_application_info.set_module('DWH_TEST','56');
a no
SELECT
h a s ฺ
a r) uide
'G' || tt1.pg_featurevalue_31_elgr_id pg_featurevalue_31_id,

'G' || tt1.ch_featurevalue_02_elgr_idฺc om ent G
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
ch_featurevalue_02_id,
a on tud
'B' || tt1.pg_featurevalue_09_id pg_featurevalue_09_id,
'B' || tt1.pg_featurevalue_15_id
l e i s S
@ countrychannel_id,
pg_featurevalue_15_id,
i l t h
ฺz productgroup_id,
'G' || tt1.countrychannel_elgr_id
l o
'B' || tt1.productgroup_id
e u s e
a rc stocknewunits
'G' || tt1.period_elgr_id
t o period_id,

FROM
l e (m ense
SUM(tt1.stocknewunits)

Zi l lic
--------------------------
--loTempTable 1
a rce--------------------------
M ( SELECT
tt1.pg_featurevalue_31_elgr_id pg_featurevalue_31_elgr_id,
tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_09_id pg_featurevalue_09_id,
tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
tt1.countrychannel_elgr_id countrychannel_elgr_id,
tt1.productgroup_id productgroup_id,
tt1.period_elgr_id period_elgr_id,
tt1.periodicity_id periodicity_id,
MAX(tt1.stocknewunits_periodicity) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t4) */
t3.elementgroup_id pg_featurevalue_31_elgr_id,
t4.ch_featurevalue_09_id ch_featurevalue_09_id,
t5.elementgroup_id ch_featurevalue_02_elgr_id,

Oracle Database 11g: New Features for Administrators 199


t2.pg_featurevalue_09_id pg_featurevalue_09_id,
t2.pg_featurevalue_15_id pg_featurevalue_15_id,
t6.elementgroup_id countrychannel_elgr_id,
t2.productgroup_id productgroup_id,
t8.elementgroup_id period_elgr_id,
t7.periodicity_id periodicity_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FIRST_VALUE(SUM(t1.pd_stock_new_units*t1.pd_projection_factor)) OVER
(PARTITION BY
t3.elementgroup_id,
t4.ch_featurevalue_09_id,
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t2.pg_featurevalue_15_id,
t6.elementgroup_id,
t2.productgroup_id,
t8.elementgroup_id,
ble
t7.periodicity_id
fe r a
ORDER BY t1.period_id DESC ROWS UNBOUNDED PRECEDING)
stocknewunits_periodicity,
ans
/* Additional Columns Begin */
n - t r
o
an
t1.period_id period_id_s

FROM
/* Additional Columns End */
s
ha deฺ
lu_item_293 t2, r )
ฺa Gui
lu_elementgroup_rel t3, m
co ent
lu_period_293 t7,
n ฺ
lu_elementgroup_rel t8,
fact_pd_out_itm_293 t1, @ ao Stud
lu_outlet_293 t4,
z i l le this
c e loฺ use
lu_elementgroup_rel t5,
r to
lu_elementgroup_rel t6
a
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.item_id = t2.item_id
e l /* Customizing Begin */

Marc AND t1.productgroup_id = t2.productgroup_id)


/* Customizing End */
AND (t2.pg_featurevalue_31_id = t3.value_id)
AND (t1.outlet_id = t4.outlet_id
/* Customizing Begin */
AND t1.period_id = t4.period_id
AND t1.project_id = t4.project_id)
/* Customizing End */
AND (t4.ch_featurevalue_02_id = t5.value_id)
AND (t4.country_channel_id = t6.value_id)
AND (t1.period_id = t7.period_id)
AND (t7.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_15_id = 1484)
AND (t2.pg_featurevalue_09_id IN (5484,5485))
AND (t4.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id = 8597)
AND (t5.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id = 14786)

Oracle Database 11g: New Features for Administrators 200


AND (t4.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t8.elementgroup_id = 14659)
AND (t7.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Push Down
Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
ble
t4.ch_featurevalue_09_id,
fe r a
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
ans
t2.pg_featurevalue_15_id,
n - t r
o
an
t6.elementgroup_id,
t2.productgroup_id,
t8.elementgroup_id, s
ha deฺ
t7.periodicity_id, r )
ฺa Gui
/* Additional GroupBys Begin */ m
co ent
t1.period_id
n ฺ
/* Additional GroupBys End */
) tt1 @ ao Stud
GROUP BY
z i l le this
c e loฺ use
tt1.pg_featurevalue_31_elgr_id,
r to
tt1.ch_featurevalue_09_id,
a
m e
tt1.ch_featurevalue_02_elgr_id,
l e ( icens
tt1.pg_featurevalue_09_id,
i l
oZ l
tt1.pg_featurevalue_15_id,
e l tt1.countrychannel_elgr_id,

Marc tt1.productgroup_id,
tt1.period_elgr_id,
tt1.periodicity_id
) tt1
GROUP BY
tt1.pg_featurevalue_31_elgr_id,
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_09_id,
tt1.pg_featurevalue_15_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @1 Results in 328 Ticks

PROMPT @Statement 57
rem #execute dbms_application_info.set_module('DWH_TEST','57');

SELECT

Oracle Database 11g: New Features for Administrators 201


'B' || tt1.pg_featurevalue_31_id pg_featurevalue_31_id,
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || tt1.productgroup_id productgroup_id,


'G' || tt1.period_elgr_id period_id,
SUM(tt1.stocknewunits) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT
tt1.pg_featurevalue_31_id pg_featurevalue_31_id,
ble
tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
fe r a
tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_elrg_id,
ans
tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
n - t r
o
an
tt1.countrychannel_elgr_id countrychannel_elgr_id,
tt1.productgroup_id productgroup_id,
tt1.period_elgr_id period_elgr_id, s
ha deฺ
tt1.periodicity_id periodicity_id, r )
ฺa Gui
m
MAX(tt1.stocknewunits_periodicity) stocknewunits
co ent
FROM
n ฺ
--------------------------
-- TempTable 1 @ ao Stud
z
--------------------------i l le this
(
c e loฺ use
r to
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t5) */
a
m e
t2.pg_featurevalue_31_id pg_featurevalue_31_id,

i l l e ( icens
t5.ch_featurevalue_09_id ch_featurevalue_09_id,

oZ l
t6.elementgroup_id ch_featurevalue_02_elgr_id,
e l t4.elementrange_id pg_featurevalue_15_elrg_id,

Marc t2.pg_featurevalue_08_id pg_featurevalue_08_id,


t7.elementgroup_id countrychannel_elgr_id,
t2.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t8.periodicity_id periodicity_id,
FIRST_VALUE(SUM(t1.pd_stock_new_units*t1.pd_projection_factor)) OVER
(PARTITION BY
t2.pg_featurevalue_31_id,
t5.ch_featurevalue_09_id,
t6.elementgroup_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t7.elementgroup_id,
t2.productgroup_id,
t9.elementgroup_id,
t8.periodicity_id
ORDER BY t1.period_id DESC ROWS UNBOUNDED PRECEDING)
stocknewunits_periodicity,
/* Additional Columns Begin */
t1.period_id period_id_s
/* Additional Columns End */
FROM

Oracle Database 11g: New Features for Administrators 202


lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
lu_period_293 t8,
lu_elementgroup_rel t9,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_outlet_293 t5,
lu_elementgroup_rel t6,
lu_elementgroup_rel t7
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ble
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
fe r a
AND (t1.outlet_id = t5.outlet_id
/* Customizing Begin */
ans
AND t1.period_id = t5.period_id
n - t r
o
an
AND t1.project_id = t5.project_id)
/* Customizing End */
AND (t5.ch_featurevalue_02_id = t6.value_id) s
ha deฺ
AND (t5.country_channel_id = t7.value_id) r )
ฺa Gui
AND (t1.period_id = t8.period_id) m
co ent
AND (t8.period_id = t9.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i l le this
AND ((t2.productgroup_id = 15520)

c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND (t2.pg_featurevalue_08_id = 716)
a
m e
AND (t5.ch_featurevalue_09_id = 7379)

i l e ( icens
AND (t2.pg_featurevalue_31_id IN (14584,14585))
l
oZ l
AND (t6.elementgroup_id IN (3481,3482))
e l AND (t4.elementrange_id = 3091)

Marc AND (t7.elementgroup_id = 14786)


AND (t5.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t8.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Push Down
Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_31_id,
t5.ch_featurevalue_09_id,
t6.elementgroup_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t7.elementgroup_id,

Oracle Database 11g: New Features for Administrators 203


t2.productgroup_id,
t9.elementgroup_id,
t8.periodicity_id,
/* Additional GroupBys Begin */
t1.period_id
/* Additional GroupBys End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

) tt1
GROUP BY
tt1.pg_featurevalue_31_id,
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id,
ble
tt1.periodicity_id
fe r a
) tt1
GROUP BY
ans
tt1.pg_featurevalue_31_id,
n - t r
tt1.ch_featurevalue_09_id,
a no
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id,
h a s ฺ
tt1.pg_featurevalue_08_id,
ฺ a r) uide
tt1.countrychannel_elgr_id,
tt1.productgroup_id, ฺ c om ent G
tt1.period_elgr_id
a on tud
/
l l e@ is S
i
ฺz se th
PROMPT @2 Results in 656 Ticks
l o
a rce to u
l e
PROMPT @Statement (m58 ense
rem #executel
Zi dbms_application_info.set_module('DWH_TEST','58');
lic
l o
a rce'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
SELECT
M 'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.stocknewunits) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT
tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_01_id pg_featurevalue_01_id,
tt1.countrychannel_elgr_id countrychannel_elgr_id,
tt1.productgroup_id productgroup_id,
tt1.period_elgr_id period_elgr_id,

Oracle Database 11g: New Features for Administrators 204


tt1.periodicity_id periodicity_id,
MAX(tt1.stocknewunits_periodicity) stocknewunits
FROM
--------------------------
-- TempTable 1
--------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
t5.pg_featurevalue_01_id pg_featurevalue_01_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t8.periodicity_id periodicity_id,
ble
FIRST_VALUE(SUM(t1.pd_stock_new_units*t1.pd_projection_factor)) OVER
fe r a
(PARTITION BY
t2.ch_featurevalue_09_id,
ans
t3.elementgroup_id,
n - t r
o
an
t7.elementrange_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id, s
ha deฺ
t5.productgroup_id, r )
ฺa Gui
t9.elementgroup_id, m
co ent
t8.periodicity_id
n ฺ
stocknewunits_periodicity, @ ao Stud
ORDER BY t1.period_id DESC ROWS UNBOUNDED PRECEDING)

z i l le this
/* Additional Columns Begin */

c e loฺ use
t1.period_id period_id_s
r to
/* Additional Columns End */
a
FROM
m e
i l l e ( icens
lu_item_293 t5,

oZ l
lu_pg_featurevalue_15 t6,
e l lu_elementrange_rel t7,

Marc lu_period_293 t8,


lu_elementgroup_rel t9,
fact_pd_out_itm_293 t1,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.period_id)

Oracle Database 11g: New Features for Administrators 205


AND (t8.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_01_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
ble
AND (t8.period_id IN
fe r a
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ans
AND (t1.period_id IN
n - t r
o
an
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Push Down
Filters */
) s
ha deฺ
/* Fact Filters */ r )
ฺa Gui
AND (t1.project_type_id = '1' m
co ent
)
n ฺ
GROUP BY
t2.ch_featurevalue_09_id, @ ao Stud
t3.elementgroup_id,
z i l le this
c e loฺ use
t7.elementrange_id,
r to
t5.pg_featurevalue_01_id,
a
m e
t4.elementgroup_id,

i l l e ( icens
t5.productgroup_id,

oZ l
t9.elementgroup_id,
e l t8.periodicity_id,

Marc /* Additional GroupBys Begin */


t1.period_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_01_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id,
tt1.periodicity_id
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_01_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id

Oracle Database 11g: New Features for Administrators 206


/
PROMPT @111 Results in 2859 Ticks

PROMPT @Statement 59
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

rem #execute dbms_application_info.set_module('DWH_TEST','59');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
'B' || t5.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t7.elementrange_id pg_featurevalue_15_id,
'B' || t5.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || t8.elementgroup_id pg_featurevalue_01_id,
'G' || t4.elementgroup_id countrychannel_id,
ble
'B' || t5.productgroup_id productgroup_id,
fe r a
'G' || t9.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ans
salesvalueeur
n - t r
o
an
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6, s
ha deฺ
lu_elementgroup_rel t8, r )
ฺa Gui
lu_elementrange_rel t7, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t9,
lu_outlet_293 t2, @ ao Stud
lu_elementgroup_rel t3,
z i l le this
lu_elementgroup_rel t4
c e loฺ use
WHERE
a r to
m
/* Attribute Joins */
e
l e ( icens
((t1.outlet_id = t2.outlet_id
i l
oZ l
/* Customizing Begin */
eANDl t1.period_id = t2.period_id

Marc AND t1.project_id = t2.project_id)


/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3092,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))

Oracle Database 11g: New Features for Administrators 207


AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_02_id,
ble
t7.elementrange_id,
fe r a
t5.pg_featurevalue_08_id,
t8.elementgroup_id,
ans
t4.elementgroup_id,
n - t r
t5.productgroup_id,
a no
/
t9.elementgroup_id
h a s ฺ
PROMPT @39 Results in 1578 Ticks
ฺ a r) uide
ฺ c om ent G
a on tud
PROMPT @Statement 60
l l e@ is S
i
ฺz se th
rem #execute dbms_application_info.set_module('DWH_TEST','60');
l o
rce tUSE_HASH(t1)
SELECT /* ORDERED INDEX(t1)
a o u INDEX(t2) */

l e (m ense ch_featurevalue_02_id,
'B' || t2.ch_featurevalue_09_id
'G' || t3.elementgroup_id
ch_featurevalue_09_id,

'B' || l
Zit5.pg_featurevalue_05_id
lic pg_featurevalue_05_id,
e l
'B' o || t5.pg_featurevalue_13_id pg_featurevalue_13_id,

Marc 'B' || t5.pg_featurevalue_15_id pg_featurevalue_15_id,


'B' || t5.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || t4.elementgroup_id countrychannel_id,
'B' || t5.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t5,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)

Oracle Database 11g: New Features for Administrators 208


AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.value_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t5.pg_featurevalue_15_id = 1481)
AND (t5.pg_featurevalue_13_id = 5424)
AND (t5.pg_featurevalue_05_id IN (5446,5447))
ble
AND (t2.ch_featurevalue_09_id = 7379)
fe r a
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)
ans
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
n - t r
o
an
*/

AND (t6.elementgroup_id = 14659) s


AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t2.ch_featurevalue_09_id,
e
l e ( icens
t3.elementgroup_id,
i l
oZ l
t5.pg_featurevalue_05_id,
e l
t5.pg_featurevalue_13_id,

Marc t5.pg_featurevalue_15_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id,
t5.productgroup_id,
t6.elementgroup_id
/
PROMPT @25 Results in 485 Ticks

PROMPT @Statement 61
rem #execute dbms_application_info.set_module('DWH_TEST','61');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
'B' || t5.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t7.elementrange_id pg_featurevalue_15_id,
'B' || t5.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t5.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || t4.elementgroup_id countrychannel_id,
'B' || t5.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 209


'G' || t8.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
ble
AND t1.period_id = t2.period_id
fe r a
AND t1.project_id = t2.project_id)
/* Customizing End */
ans
AND (t2.ch_featurevalue_02_id = t3.value_id)
n - t r
o
an
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */ s
ha deฺ
AND t1.productgroup_id = t5.productgroup_id) r )
ฺa Gui
/* Customizing End */ m
co ent

AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
n
AND (t1.period_id = t8.value_id) @ ao Stud
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t5.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND (t5.pg_featurevalue_01_id IN
i l
oZ l
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
e l
97,3891,71,76,89,92,95))

Marc AND (t5.pg_featurevalue_08_id IN (716,717))


AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3092,3107))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t8.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_02_id,
t7.elementrange_id,

Oracle Database 11g: New Features for Administrators 210


t5.pg_featurevalue_08_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id,
t5.productgroup_id,
t8.elementgroup_id
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @109 Results in 2390 Ticks

PROMPT @Statement 62
rem #execute dbms_application_info.set_module('DWH_TEST','62');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
ble
'B' || t5.pg_featurevalue_13_id pg_featurevalue_13_id,
fe r a
'B' || t5.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t7.elementrange_id pg_featurevalue_15_id,
ans
'B' || t5.pg_featurevalue_08_id pg_featurevalue_08_id,
n - t r
o
an
'B' || t5.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || t4.elementgroup_id countrychannel_id,
'B' || t5.productgroup_id productgroup_id, s
ha deฺ
'G' || t8.elementgroup_id period_id, r )
ฺa Gui
m
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
co ent
salesvalueeur
n ฺ
FROM
lu_item_293 t5, @ ao Stud
lu_pg_featurevalue_15 t6,
z i l le this
lu_elementrange_rel t7,
c e loฺ use
r
fact_pd_out_itm_293 t1,
a to
m
lu_elementgroup_rel t8,
e
l e ( icens
lu_outlet_293 t2,
i l
oZ l
lu_elementgroup_rel t3,
e l
lu_elementgroup_rel t4

MarcWHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 211


AND (t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t5.pg_featurevalue_13_id = 5424)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.ch_featurevalue_09_id = 7379)


AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t8.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ble
ElementGroup Filters */
fe r a
)
/* Fact Filters */
ans
AND (t1.project_type_id = '1'
n - t r
o
an
)
GROUP BY
t2.ch_featurevalue_09_id, s
ha deฺ
t3.elementgroup_id, r )
ฺa Gui
t5.pg_featurevalue_13_id, m
co ent
t5.pg_featurevalue_02_id,
n ฺ
t7.elementrange_id,
t5.pg_featurevalue_08_id, @ ao Stud
t5.pg_featurevalue_01_id,
z i l le this
t4.elementgroup_id,
c e loฺ use
t5.productgroup_id,
a r to
m
t8.elementgroup_id
e
/
i l l e ( icens
oZ l
PROMPT @88 Results in 1609 Ticks
e l
arc
M PROMPT @Statement 63
rem #execute dbms_application_info.set_module('DWH_TEST','63');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t4) */


'G' || t3.elementgroup_id pg_featurevalue_31_id,
'B' || t4.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t5.elementgroup_id ch_featurevalue_02_id,
'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,
'G' || t6.elementgroup_id countrychannel_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_outlet_293 t4,
lu_elementgroup_rel t6,

Oracle Database 11g: New Features for Administrators 212


lu_elementgroup_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.pg_featurevalue_31_id = t3.value_id)
AND (t1.outlet_id = t4.outlet_id
/* Customizing Begin */
AND t1.period_id = t4.period_id
AND t1.project_id = t4.project_id)
/* Customizing End */
AND (t4.ch_featurevalue_02_id = t5.value_id)
AND (t4.country_channel_id = t6.value_id)
AND (t1.period_id = t7.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_09_id IN (5484,5485))
AND (t4.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id = 8597) s
ha deฺ
AND (t5.elementgroup_id IN (3481,3482)) r )
ฺa Gui
AND (t6.elementgroup_id = 14786) m
co ent

AND (t4.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
n
*/
@ ao Stud
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
z
AND (t7.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t3.elementgroup_id,
t4.ch_featurevalue_09_id,
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t6.elementgroup_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @4 Results in 375 Ticks

PROMPT @Statement 64
rem #execute dbms_application_info.set_module('DWH_TEST','64');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t3) */


'B' || t2.pg_featurevalue_18_id pg_featurevalue_18_id,
'B' || t3.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t4.elementgroup_id ch_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 213


'G' || t5.elementgroup_id countrychannel_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t3,
lu_elementgroup_rel t5,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t1.outlet_id = t3.outlet_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.period_id = t3.period_id
AND t1.project_id = t3.project_id)
/* Customizing End */ s
ha deฺ
AND (t3.ch_featurevalue_02_id = t4.value_id) r )
ฺa Gui
AND (t3.country_channel_id = t5.value_id) m
co ent
AND (t1.period_id = t6.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i
AND ((t2.productgroup_id = 15520) l le this
c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND (t2.pg_featurevalue_15_id IN (1481,1483,1484))
a
m e
AND (t3.ch_featurevalue_09_id = 7379)
l e ( icens
AND (t2.pg_featurevalue_18_id IN (94860,94862,94863,94864,94865))
i l
oZ l
AND (t4.elementgroup_id IN (3481,3482))
e l
AND (t5.elementgroup_id = 14786)

Marc*/
AND (t3.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters

AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_18_id,
t3.ch_featurevalue_09_id,
t4.elementgroup_id,
t2.pg_featurevalue_15_id,
t5.elementgroup_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @13 Results in 1453 Ticks

Oracle Database 11g: New Features for Administrators 214


PROMPT @Statement 65
rem #execute dbms_application_info.set_module('DWH_TEST','65');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,


'G' || t3.elementgroup_id ch_featurevalue_02_id,
'B' || t5.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t5.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t5.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t5.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || t4.elementgroup_id countrychannel_id,
'B' || t5.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
ble
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
fe r a
FROM
lu_item_293 t5,
ans
fact_pd_out_itm_293 t1,
n - t r
o
an
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t4, s
ha deฺ
lu_elementgroup_rel t3 r )
ฺa Gui
WHERE m
co ent
/* Attribute Joins */
n ฺ
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */ @ ao Stud
AND
z i
t1.period_id = t2.period_id l le this
AND
loฺ use
t1.project_id = t2.project_id)
c e
/* Customizing End */
a r to
m e
AND (t2.ch_featurevalue_02_id = t3.value_id)
l e ( icens
AND (t2.country_channel_id = t4.value_id)
i l
oZ l
AND (t1.item_id = t5.item_id
e l
/* Customizing Begin */

Marc AND t1.productgroup_id = t5.productgroup_id)


/* Customizing End */
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t5.pg_featurevalue_15_id = 1484)
AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t5.pg_featurevalue_05_id = 5447)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t6.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 215


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND t1.project_type_id = '1'


)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
t5.pg_featurevalue_02_id,
t5.pg_featurevalue_15_id,
t5.pg_featurevalue_01_id,
t4.elementgroup_id,
ble
t5.productgroup_id,
fe r a
/
t6.elementgroup_id
ans
PROMPT @31 Results in 610 Ticks
n - t r
a no
h a s ฺ
PROMPT @Statement 66
ฺ a r) uide
ฺ c om ent G
rem #execute dbms_application_info.set_module('DWH_TEST','66');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1)


a on INDEX(t2)
t u d */
'B' || t2.ch_featurevalue_09_id
l e@ is S
ch_featurevalue_09_id,
'G' || t3.elementgroup_idilch_featurevalue_02_id,
l o e th
ฺz pg_featurevalue_15_id,
us
'r' || t7.elementrange_id
rce tocountrychannel_id,
'G' || t4.elementgroup_id
a
l e (m ense period_id,
'B' || t5.productgroup_id
'G' || t8.elementgroup_id
productgroup_id,

Zi l lic
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
l o
rcelu_item_293 t5,
salesvalueeur

M a
FROM

lu_pg_featurevalue_15 t6,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 216


AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107,5784))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t8.elementgroup_id = 14659)
AND (t1.period_id IN
ble
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
fe r a
ElementGroup Filters */
)
ans
/* Fact Filters */
n - t r
AND (t1.project_type_id = '1'
a no
)
GROUP BY
h a s ฺ
t2.ch_featurevalue_09_id,
ฺ a r) uide
t3.elementgroup_id,
t7.elementrange_id, ฺ c om ent G
t4.elementgroup_id,
a on tud
t5.productgroup_id,
l l e@ is S
t8.elementgroup_id i
ฺz se th
/
l o
rce to u
PROMPT @10 Results in 3984 Ticks
a
l e (m ense
Zi l lic
PROMPTlo@Statement 67
a rce#execute dbms_application_info.set_module('DWH_TEST','67');
rem
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
'B' || t5.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || t4.elementgroup_id countrychannel_id,
'B' || t5.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t5,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */

Oracle Database 11g: New Features for Administrators 217


AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t2.ch_featurevalue_09_id = 7379)
ble
AND (t3.elementgroup_id IN (3481,3482))
fe r a
AND NOT ((/* ElementGroup Subselect */
(
ans
t5.pg_featurevalue_01_id IN
n - t r
o
an
(SELECT g1.value_id
FROM
WHERE
lu_elementgroup_rel g1
s
ha deฺ
/* ElementGroup Filters */ r )
ฺa Gui
m
(g1.elementgroup_id IN (1959,1960,1961,1962))
co ent
)
n ฺ
)
)
@ ao Stud
)
z i l le this
c e loฺ use
AND (t4.elementgroup_id = 14786)
r to
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
a
*/
m e
l e ( icens
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
i l
oZ l
AND (t6.elementgroup_id = 14659)
e l
AND (t1.period_id IN

Marc(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t6.elementgroup_id
/
PROMPT @4 Results in 4390 Ticks

PROMPT @Statement 68
rem #execute dbms_application_info.set_module('DWH_TEST','68');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */

Oracle Database 11g: New Features for Administrators 218


'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
'B' || t5.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || t6.elementgroup_id pg_featurevalue_01_id,
'G' || t4.elementgroup_id countrychannel_id,
'B' || t5.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || t7.elementgroup_id period_id,


SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t5,
lu_elementgroup_rel t6,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
ble
lu_elementgroup_rel t4
fe r a
WHERE
/* Attribute Joins */
ans
((t1.outlet_id = t2.outlet_id
n - t r
o
an
/* Customizing Begin */
AND
AND
t1.period_id = t2.period_id
t1.project_id = t2.project_id) s
ha deฺ
/* Customizing End */ r )
ฺa Gui
AND (t2.ch_featurevalue_02_id = t3.value_id) m
co ent
AND (t2.country_channel_id = t4.value_id)
n ฺ
AND (t1.item_id = t5.item_id
/* Customizing Begin */ @ ao Stud
AND
z i l le this
t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
c e loฺ use
r to
AND (t5.pg_featurevalue_01_id = t6.value_id)
a
m e
AND (t1.period_id = t7.value_id)
)
i l l e ( icens
oZ l
/* Attribute Filters */
e l
AND ((t5.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 219


t6.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id,
t7.elementgroup_id
/
PROMPT @19 Results in 1813 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 69
rem #execute dbms_application_info.set_module('DWH_TEST','69');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
'B' || t5.pg_featurevalue_05_id pg_featurevalue_05_id,
ble
'B' || t5.pg_featurevalue_13_id pg_featurevalue_13_id,
fe r a
'B' || t5.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t5.pg_featurevalue_15_id pg_featurevalue_15_id,
ans
'G' || t4.elementgroup_id countrychannel_id,
n - t r
o
an
'B' || t5.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
s
ha deฺ
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM m
co ent
lu_item_293 t5,
n ฺ
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6, @ ao Stud
lu_outlet_293 t2,
z i l le this
lu_elementgroup_rel t4,
c e loฺ use
r
lu_elementgroup_rel t3
a to
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.outlet_id = t2.outlet_id
e l
/* Customizing Begin */

Marc AND
AND
t1.period_id = t2.period_id
t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_15_id = 1485)
AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t5.pg_featurevalue_13_id IN (5424,5425))
AND (t5.pg_featurevalue_05_id = 5447)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)

Oracle Database 11g: New Features for Administrators 220


AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_05_id,
ble
t5.pg_featurevalue_13_id,
fe r a
t5.pg_featurevalue_02_id,
t5.pg_featurevalue_15_id,
ans
t4.elementgroup_id,
n - t r
t5.productgroup_id,
a no
/
t6.elementgroup_id
h a s ฺ
PROMPT @8 Results in 734 Ticks
ฺ a r) uide
ฺ c om ent G
a on tud
PROMPT @Statement 70
l l e@ is S
i
ฺz se th
rem #execute dbms_application_info.set_module('DWH_TEST','70');
l o
rce tUSE_HASH(t1)
SELECT /* ORDERED INDEX(t1)
a o u INDEX(t2) */

l e (m ense ch_featurevalue_02_id,
'B' || t2.ch_featurevalue_09_id
'G' || t3.elementgroup_id
ch_featurevalue_09_id,

'B' || l
Zit5.pg_featurevalue_13_id
lic pg_featurevalue_13_id,
e l
'B' o || t5.pg_featurevalue_08_id pg_featurevalue_08_id,

Marc 'G' || t4.elementgroup_id countrychannel_id,


'B' || t5.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t5,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t4,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id

Oracle Database 11g: New Features for Administrators 221


/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t5.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_13_id = 5424)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND NOT ((/* ElementGroup Subselect */
(
t5.pg_featurevalue_01_id IN
(SELECT g1.value_id
ble
FROM lu_elementgroup_rel g1
fe r a
WHERE
/* ElementGroup Filters */
ans
(g1.elementgroup_id IN (1959,1960,1961,1962))
n - t r
o
an
)

)
)
s
ha deฺ
) r )
ฺa Gui
AND (t4.elementgroup_id = 14786) m
co ent

AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
n
*/
@ ao Stud
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
z
AND (t6.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc AND t1.project_type_id = '1'


)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_13_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
t6.elementgroup_id
/
PROMPT @4 Results in 1281 Ticks

PROMPT @Statement 71
rem #execute dbms_application_info.set_module('DWH_TEST','71');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t3) */


'B' || t2.pg_featurevalue_42_id pg_featurevalue_42_id,
'B' || t3.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || t4.elementgroup_id ch_featurevalue_02_id,

Oracle Database 11g: New Features for Administrators 222


'G' || t5.elementgroup_id countrychannel_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t3,
lu_elementgroup_rel t5,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t1.outlet_id = t3.outlet_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.period_id = t3.period_id
AND t1.project_id = t3.project_id)
/* Customizing End */ s
ha deฺ
AND (t3.ch_featurevalue_02_id = t4.value_id) r )
ฺa Gui
AND (t3.country_channel_id = t5.value_id) m
co ent
AND (t1.period_id = t6.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i
AND ((t2.productgroup_id = 15520) l le this
c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND (t3.ch_featurevalue_09_id = 7379)
a
m e
AND (t2.pg_featurevalue_42_id = 17598)
l e ( icens
AND (t4.elementgroup_id IN (3481,3482))
i l
oZ l
AND (t5.elementgroup_id = 14786)
e l
AND (t3.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters

Marc*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_42_id,
t3.ch_featurevalue_09_id,
t4.elementgroup_id,
t5.elementgroup_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @2 Results in 406 Ticks

Oracle Database 11g: New Features for Administrators 223


PROMPT @Statement 72
rem #execute dbms_application_info.set_module('DWH_TEST','72');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t4) */


'G' || t3.elementgroup_id pg_featurevalue_42_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t4.ch_featurevalue_09_id ch_featurevalue_09_id,


'G' || t5.elementgroup_id ch_featurevalue_02_id,
'G' || t6.elementgroup_id countrychannel_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t7,
lu_outlet_293 t4,
ans
lu_elementgroup_rel t6,
n - t r
o
an
lu_elementgroup_rel t5
WHERE
/* Attribute Joins */ s
ha deฺ
((t1.item_id = t2.item_id r )
ฺa Gui
/* Customizing Begin */ m
co ent
AND ฺ
t1.productgroup_id = t2.productgroup_id)
n
/* Customizing End */
@ ao Stud
AND (t2.pg_featurevalue_42_id = t3.value_id)
z
AND (t1.outlet_id = t4.outlet_idi l le this
/* Customizing Begin */
c e loฺ use
AND
r to
t1.period_id = t4.period_id
a
AND
m e
t1.project_id = t4.project_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t4.ch_featurevalue_02_id = t5.value_id)
e l
AND (t4.country_channel_id = t6.value_id)

Marc AND (t1.period_id = t7.value_id)


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t4.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id = 8511)
AND (t5.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id = 14786)
AND (t4.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY

Oracle Database 11g: New Features for Administrators 224


t3.elementgroup_id,
t4.ch_featurevalue_09_id,
t5.elementgroup_id,
t6.elementgroup_id,
t2.productgroup_id,
t7.elementgroup_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
PROMPT @2 Results in 531 Ticks

PROMPT @Statement 73
rem #execute dbms_application_info.set_module('DWH_TEST','73');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */


'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,
ble
'G' || t3.elementgroup_id ch_featurevalue_02_id,
fe r a
'B' || t5.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t5.pg_featurevalue_08_id pg_featurevalue_08_id,
ans
'G' || t4.elementgroup_id countrychannel_id,
n - t r
o
an
'B' || t5.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
s
ha deฺ
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM m
co ent
lu_item_293 t5,
n ฺ
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6, @ ao Stud
lu_outlet_293 t2,
z i l le this
lu_elementgroup_rel t4,
c e loฺ use
r
lu_elementgroup_rel t3
a to
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.outlet_id = t2.outlet_id
e l
/* Customizing Begin */

Marc AND
AND
t1.period_id = t2.period_id
t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_08_id IN (716,717))
AND (t5.pg_featurevalue_15_id IN (1476,1480,1483))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 225


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.project_type_id = '1'


AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t5.pg_featurevalue_15_id,
t5.pg_featurevalue_08_id,
t4.elementgroup_id,
t5.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @8 Results in 500 Ticks
ans
n - t r
a no
PROMPT @Statement 74
h a s ฺ
a
rem #execute dbms_application_info.set_module('DWH_TEST','74');
ฺ r) uide
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺINDEX(t2) c om en*/t G
a on tud
'B' || t2.ch_featurevalue_09_id ch_featurevalue_09_id,

l e i s S
@ pg_featurevalue_02_id,
'G' || t3.elementgroup_id ch_featurevalue_02_id,
i l t h
ฺz pg_featurevalue_15_id,
'B' || t5.pg_featurevalue_02_id
l
'r' || t7.elementrange_id
e o u s e
a rc
'G' || t4.elementgroup_id
t o countrychannel_id,

l e (m ense period_id,
'B' || t5.productgroup_id
'G' || t8.elementgroup_id
productgroup_id,

Zi l lic
SUM(t1.pd_purchase_units*t1.pd_projection_factor) purchaseunits,
l o
rcelu_item_293 t5,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

M a
FROM

lu_pg_featurevalue_15 t6,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 226


AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t5.pg_featurevalue_02_id IN (4165,4166))
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id = 3091)
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup Filters
*/
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t8.elementgroup_id = 14659)
ble
AND (t1.period_id IN
fe r a
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ans
)
n - t r
o
an
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1' s
ha deฺ
) r )
ฺa Gui
GROUP BY m
co ent
t2.ch_featurevalue_09_id,
n ฺ
t3.elementgroup_id,
t5.pg_featurevalue_02_id, @ ao Stud
t7.elementrange_id,
z i l le this
t4.elementgroup_id,
c e loฺ use
t5.productgroup_id,
a r to
m
t8.elementgroup_id
e
/
i l l e ( icens
oZ l
PROMPT @4 Results in 1406 Ticks
e l
arc
M PROMPT @Statement 75
rem #execute dbms_application_info.set_module('DWH_TEST','75');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(

Oracle Database 11g: New Features for Administrators 227


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t6.elementrange_id pg_featurevalue_15_elrg_id,
t4.pg_featurevalue_08_id pg_featurevalue_08_id,
t7.elementgroup_id pg_featurevalue_01_elgr_id,
t3.elementgroup_id countrychannel_elgr_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t4.productgroup_id productgroup_id,
t8.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
ble
MAX(t1.pd_distribution_factor) distributionfactor,
fe r a
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
ans
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n - t r
o
an
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +

/* Additional Columns Begin */ s


ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
ha deฺ
r )
ฺa Gui
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d m
co ent
/* Additional Columns End */
n ฺ
FROM
lu_item_293 t4, @ ao Stud
z
lu_pg_featurevalue_15 t5, i l le this
c e loฺ use
lu_elementgroup_rel t7,
r
lu_elementrange_rel t6,
a to
m e
fact_pd_out_itm_293 t1,
l e ( icens
lu_elementgroup_rel t8,
i l
oZ l
lu_outlet_293 t2,
e l lu_elementgroup_rel t3

Marc WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.country_channel_id = t3.value_id)
AND (t1.item_id = t4.item_id
/* Customizing Begin */
AND t1.productgroup_id = t4.productgroup_id)
/* Customizing End */
AND (t4.pg_featurevalue_15_id = t5.pg_featurevalue_15_id)
AND (t5.pg_featurevalue_15_num BETWEEN t6.lbound AND t6.ubound)
AND (t4.pg_featurevalue_01_id = t7.value_id)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t4.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t4.pg_featurevalue_08_id = 716)
AND (t2.ch_featurevalue_09_id IN (7380,7381))

Oracle Database 11g: New Features for Administrators 228


AND (t6.elementrange_id = 5819)
AND (t7.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t3.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t8.elementgroup_id = 14659)


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ble
AND t1.project_type_id = '1'
fe r a
AND t1.project_type_id = '1'
)
ans
GROUP BY
n - t r
o
an
t2.ch_featurevalue_09_id,
t6.elementrange_id,
t4.pg_featurevalue_08_id, s
ha deฺ
t7.elementgroup_id, r )
ฺa Gui
t3.elementgroup_id, m
co ent
t4.productgroup_id,
n ฺ
t8.elementgroup_id,
t2.outlet_id, @ ao Stud
t1.project_id,
z i l le this
c e loฺ use
/* Additional GroupBys Begin */
r to
t1.project_id, t1.period_id, t1.outlet_id
a
m e
/* Additional GroupBys End */
) tt1
i l l e ( icens
oZ l
GROUP BY
e l
tt1.ch_featurevalue_09_id,

Marc tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_08_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @0 Results in 875 Ticks

PROMPT @Statement 76
rem #execute dbms_application_info.set_module('DWH_TEST','76');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,

Oracle Database 11g: New Features for Administrators 229


SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t4.pg_featurevalue_05_id pg_featurevalue_05_id,
t4.pg_featurevalue_08_id pg_featurevalue_08_id,
t3.elementgroup_id countrychannel_elgr_id,
t4.productgroup_id productgroup_id,
t5.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
ble
t1.project_id project_id,
fe r a
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
ans
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
n - t r
o
an
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
s
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ha deฺ
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
r )
ฺa Gui
MAX(t1.pd_distribution_factor) distributionfactor,
m
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
co ent
dissalesflag,
n ฺ
@ ao Stud
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
z i l le this
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,

c e loฺ use
/* Additional Columns Begin */
r to
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
a
outlet_id_d
m e
l e ( icens
/* Additional Columns End */
i l
oZ l
FROM
e l lu_item_293 t4,

Marc fact_pd_out_itm_293 t1,


lu_elementgroup_rel t5,
lu_outlet_293 t2,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.country_channel_id = t3.value_id)
AND (t1.item_id = t4.item_id
/* Customizing Begin */
AND t1.productgroup_id = t4.productgroup_id)
/* Customizing End */
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t4.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 230


AND NOT ((t4.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t4.pg_featurevalue_08_id = 717)
AND (t4.pg_featurevalue_05_id IN (5446,5447))
AND (t2.ch_featurevalue_09_id IN (7380,7381))
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t3.elementgroup_id = 14786)


AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
ble
AND (t1.project_type_id = '1'
fe r a
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ans
AND t1.project_type_id = '1'
n - t r
o
an
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
) s
ha deฺ
GROUP BY r )
ฺa Gui
t2.ch_featurevalue_09_id, m
co ent
t4.pg_featurevalue_05_id,
n ฺ
t4.pg_featurevalue_08_id,
t3.elementgroup_id, @ ao Stud
t4.productgroup_id,
z i l le this
t5.elementgroup_id,
c e loฺ use
t2.outlet_id,
a r to
m
t1.project_id,
e
l e ( icens
/* Additional GroupBys Begin */
i l
oZ l
t1.project_id, t1.period_id, t1.outlet_id
e l /* Additional GroupBys End */

Marc ) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_08_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @4 Results in 687 Ticks

PROMPT @Statement 77
rem #execute dbms_application_info.set_module('DWH_TEST','77');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || tt1.pg_featurevalue_01_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,

Oracle Database 11g: New Features for Administrators 231


'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t4.pg_featurevalue_05_id pg_featurevalue_05_id,
t4.pg_featurevalue_08_id pg_featurevalue_08_id,
t4.pg_featurevalue_01_id pg_featurevalue_01_id,
ble
t3.elementgroup_id countrychannel_elgr_id,
fe r a
t4.productgroup_id productgroup_id,
t5.elementgroup_id period_elgr_id,
ans
t2.outlet_id outlet_id,
n - t r
o
an
t1.project_id project_id,

dnfactorsales, s
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
ha deฺ
r )
ฺa Gui
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
m
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
co ent

ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
n
@ ao Stud
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
z i l le this
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
c e loฺ use
r to
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
a
m e
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
l e ( icens
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
i l
oZ l
/* Additional Columns Begin */
e l t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id

Marcoutlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_outlet_293 t2,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.country_channel_id = t3.value_id)
AND (t1.item_id = t4.item_id
/* Customizing Begin */
AND t1.productgroup_id = t4.productgroup_id)
/* Customizing End */
AND (t1.period_id = t5.value_id)
)

Oracle Database 11g: New Features for Administrators 232


/* Attribute Filters */
AND ((t4.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t4.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t4.pg_featurevalue_08_id = 717)


AND (t4.pg_featurevalue_05_id IN (5446,5447))
AND (t2.ch_featurevalue_09_id IN (7380,7381))
AND (t3.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ble
ElementGroup Filters */
fe r a
)
/* Fact Filters */
ans
AND (t1.project_type_id = '1'
n - t r
o
an
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1' s
ha deฺ
AND t1.project_type_id = '1' r )
ฺa Gui
AND t1.project_type_id = '1' m
co ent
)
n ฺ
GROUP BY
t2.ch_featurevalue_09_id, @ ao Stud
z
t4.pg_featurevalue_05_id, i l le this
c e loฺ use
t4.pg_featurevalue_08_id,
r to
t4.pg_featurevalue_01_id,
a
m
t3.elementgroup_id,
e
l e ( icens
t4.productgroup_id,
i l
oZ l
t5.elementgroup_id,
e l t2.outlet_id,

Marc t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_08_id,
tt1.pg_featurevalue_01_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @58 Results in 1969 Ticks

PROMPT @Statement 78
rem #execute dbms_application_info.set_module('DWH_TEST','78');

SELECT

Oracle Database 11g: New Features for Administrators 233


'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'B' || tt1.pg_featurevalue_05_id pg_featurevalue_05_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || tt1.period_elgr_id period_id,


SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
ble
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
fe r a
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t4.pg_featurevalue_05_id pg_featurevalue_05_id,
ans
t6.elementrange_id pg_featurevalue_15_elrg_id,
n - t r
o
an
t7.elementgroup_id pg_featurevalue_01_elgr_id,
t3.elementgroup_id countrychannel_elgr_id,
t4.productgroup_id productgroup_id, s
ha deฺ
t8.elementgroup_id period_elgr_id, r )
ฺa Gui
t2.outlet_id outlet_id, m
co ent
t1.project_id project_id,
n ฺ
dnfactorsales, @ ao Stud
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))

z i l le this
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,

c e loฺ use
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
r to
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
a
m e
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
l e ( icens
MAX(t1.pd_distribution_factor) distributionfactor,
i l
oZ l
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
e l
dissalesflag,

Marc SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t4,
lu_pg_featurevalue_15 t5,
lu_elementgroup_rel t7,
lu_elementrange_rel t6,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t8,
lu_outlet_293 t2,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)

Oracle Database 11g: New Features for Administrators 234


/* Customizing End */
AND (t2.country_channel_id = t3.value_id)
AND (t1.item_id = t4.item_id
/* Customizing Begin */
AND t1.productgroup_id = t4.productgroup_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t4.pg_featurevalue_15_id = t5.pg_featurevalue_15_id)


AND (t5.pg_featurevalue_15_num BETWEEN t6.lbound AND t6.ubound)
AND (t4.pg_featurevalue_01_id = t7.value_id)
AND (t1.period_id = t8.value_id)
)
/* Attribute Filters */
AND ((t4.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t4.pg_featurevalue_05_id IN (5446,5447))
AND (t2.ch_featurevalue_09_id IN (7380,7381))
ble
AND (t6.elementrange_id = 3091)
fe r a
AND (t7.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t3.elementgroup_id = 14786)
ans
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
n - t r
o
an
Filters */

AND (t8.elementgroup_id = 14659) s


AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
z i
AND (t1.project_type_id = '1' l le this
c e loฺ use
AND t1.project_type_id = '1'
r to
AND t1.project_type_id = '1'
a
m e
AND t1.project_type_id = '1'
l e ( icens
AND t1.project_type_id = '1'
i l
oZ l
AND t1.project_type_id = '1'
e l )

Marc GROUP BY
t2.ch_featurevalue_09_id,
t4.pg_featurevalue_05_id,
t6.elementrange_id,
t7.elementgroup_id,
t3.elementgroup_id,
t4.productgroup_id,
t8.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.pg_featurevalue_05_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id

Oracle Database 11g: New Features for Administrators 235


/
PROMPT @9 Results in 1437 Ticks

PROMPT @Statement 79
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

rem #execute dbms_application_info.set_module('DWH_TEST','79');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || tt1.pg_featurevalue_08_id pg_featurevalue_08_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
ble
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
fe r a
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
ans
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
n - t r
o
an
FROM
--------------------------
-- TempTable 1 s
ha deฺ
-------------------------- r )
ฺa Gui
( m
co ent

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
n
@ ao Stud
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t4.pg_featurevalue_02_id pg_featurevalue_02_id,
z i l le this
t4.pg_featurevalue_15_id pg_featurevalue_15_id,

c e loฺ use
t4.pg_featurevalue_08_id pg_featurevalue_08_id,
r to
t3.elementgroup_id countrychannel_elgr_id,
a
m e
t4.productgroup_id productgroup_id,
l e ( icens
t5.elementgroup_id period_elgr_id,
i l
oZ l
t2.outlet_id outlet_id,
e l t1.project_id project_id,

Marc SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_outlet_293 t2,
lu_elementgroup_rel t3

Oracle Database 11g: New Features for Administrators 236


WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.country_channel_id = t3.value_id)
AND (t1.item_id = t4.item_id
/* Customizing Begin */
AND t1.productgroup_id = t4.productgroup_id)
/* Customizing End */
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t4.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t4.pg_featurevalue_08_id IN (716,717))
AND (t4.pg_featurevalue_15_id IN (12425,1485))
ans
AND (t4.pg_featurevalue_02_id IN (4165,4166))
n - t r
o
an
AND (t2.ch_featurevalue_09_id IN (7380,7381))
AND (t3.elementgroup_id = 14786)
s
ha deฺ
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */ r )
ฺa Gui
m
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
co ent
AND (t5.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
l e ( icens
AND t1.project_type_id = '1'
i l
oZ l
AND t1.project_type_id = '1'
e lAND t1.project_type_id = '1'

Marc AND t1.project_type_id = '1'


AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t4.pg_featurevalue_02_id,
t4.pg_featurevalue_15_id,
t4.pg_featurevalue_08_id,
t3.elementgroup_id,
t4.productgroup_id,
t5.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_15_id,
tt1.pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 237


tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @14 Results in 1344 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 80
rem #execute dbms_application_info.set_module('DWH_TEST','80');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'B' || tt1.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || tt1.pg_featurevalue_15_id pg_featurevalue_15_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
ble
'G' || tt1.countrychannel_elgr_id countrychannel_id,
fe r a
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
ans
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
n - t r
o
an
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
s
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
ha deฺ
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM r )
ฺa Gui
-------------------------- m
co ent
-- TempTable 1
n ฺ
--------------------------
( @ ao Stud
z i l le this
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */

c e loฺ use
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
r to
t4.pg_featurevalue_13_id pg_featurevalue_13_id,
a
m e
t4.pg_featurevalue_15_id pg_featurevalue_15_id,
l e ( icens
t5.elementgroup_id pg_featurevalue_01_elgr_id,
i l
oZ l
t3.elementgroup_id countrychannel_elgr_id,
e l t4.productgroup_id productgroup_id,

Marc t6.elementgroup_id period_elgr_id,


t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t4,
lu_elementgroup_rel t5,

Oracle Database 11g: New Features for Administrators 238


fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_outlet_293 t2,
lu_elementgroup_rel t3
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.country_channel_id = t3.value_id)
AND (t1.item_id = t4.item_id
/* Customizing Begin */
AND t1.productgroup_id = t4.productgroup_id)
/* Customizing End */
ble
AND (t4.pg_featurevalue_01_id = t5.value_id)
fe r a
AND (t1.period_id = t6.value_id)
)
ans
/* Attribute Filters */
n - t r
o
an
AND ((t4.productgroup_id = 15520)

AND (t4.pg_featurevalue_15_id IN (1481,1484)) s


AND (t1.productgroup_id = 15520) /* Push Down Filters */
ha deฺ
AND (t4.pg_featurevalue_13_id = 5424) r )
ฺa Gui
m
AND (t2.ch_featurevalue_09_id IN (7380,7381))
co ent

AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))
n
AND (t3.elementgroup_id = 14786)
@ ao Stud
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
z i l le this
c e loฺ use
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
r to
AND (t6.elementgroup_id = 14659)
a
m
AND (t1.period_id IN
e
l e ( icens
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
i l
oZ l
ElementGroup Filters */
e l )

Marc /* Fact Filters */


AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t4.pg_featurevalue_13_id,
t4.pg_featurevalue_15_id,
t5.elementgroup_id,
t3.elementgroup_id,
t4.productgroup_id,
t6.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1

Oracle Database 11g: New Features for Administrators 239


GROUP BY
tt1.ch_featurevalue_09_id,
tt1.pg_featurevalue_13_id,
tt1.pg_featurevalue_15_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @12 Results in 671 Ticks

set timing off;


-- set module info to null
execute dbms_application_info.set_module(NULL, NULL);

PROMPT we are done


bl e
set autotrace off;
fe r a
set echo on;
set termout on;
ans
SELECT '@End', sysdate from dual;
n - t r
spool off;
a no
FIN!
h a s ฺ
ฺ a r) uide
ฺ c om ent G
----------------------------------------------------------
a on tud
l l e@ is S
/home/oracle/solutions/SPAbig/capsts10g.sh:
#!/bin/ksh i
ฺz se th
l o
export ORACLE_SID=db10g
a rce to u
l e (m ense
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1
Zi l lic
exportlo
rce
aPATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
M sr/X11R6/bin
sqlplus system/oracle <<FIN!

SET ECHO ON;


SET TIMING ON;

begin
DBMS_SQLTUNE.CREATE_SQLSET (sqlset_name => 'STS_JFV');

dbms_sqltune.capture_cursor_cache_sqlset(
sqlset_name => 'STS_JFV' ,
basic_filter=> q'# module
like 'DWH_TEST%' and sql_text not like '%applicat%' and parsing_schema_name in
('APPS') #' ,
time_limit => 6*60,
repeat_interval => 5);
end ;
/
show errors

Oracle Database 11g: New Features for Administrators 240


FIN!

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/SPAbig/exportapps.sh:
#!/bin/ksh

export ORACLE_SID=db10g

export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1

export
PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
sr/X11R6/bin
ble
fe r a
sqlplus apps/apps <<FIN!
ans
drop table plan_table purge;
n - t r
a no
FIN!
h a s ฺ
a r) uide
rm /u01/app/oracle/product/10.2.0/dbhome_1/rdbms/log/appsandstage.dmp

c m nt G
odumpfile=appsandstage
expdp system/oracle directory=DATA_PUMP_DIR
n ฺ e schemas=apps

@ ao Stud
z i l le this
----------------------------------------------------------

c e loฺ use
r to
/home/oracle/solutions/SPAbig/importapps.sh:
a
#!/bin/ksh
m e
i l l e ( icens
Z l
export ORACLE_SID=orcl
l o
a rce ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export
M export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus / as sysdba <<FIN!

drop user apps cascade;

host impdp system/oracle_4U directory=DATA_PUMP_DIR dumpfile=appsandstage

FIN!

----------------------------------------------------------

/home/oracle/solutions/SPAbig/movedmp.sh:
#!/bin/ksh

mv /u01/app/oracle/product/10.2.0/dbhome_1/rdbms/log/appsandstage.dmp
/u01/app/oracle/admin/orcl/dpdump/appsandstage.dmp

Oracle Database 11g: New Features for Administrators 241


----------------------------------------------------------

/home/oracle/solutions/SPAbig/old1_wrkl10g_jfv.sh:
#!/bin/ksh
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

export ORACLE_SID=db10g

export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1

export
PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
sr/X11R6/bin

sqlplus sys/oracle as sysdba <<FIN!


ble
fe r a
-- as sysdba flush the shared pool
ALTER system flush buffer_cache;
ans
ALTER system flush shared_pool;
n - t r
o
s an
-- connect as dwh_test
r ) ha deฺ
CONNECT apps/apps;
set echo on; m ฺa Gui
spool /tmp/dwh_test.log;
n ฺ co ent
-- Generated on Thu Sep 18 20:38:59 2003
ALTER SESSION SET NLS_DATE_FORMAT@ =a
o
S tud
'YYYY:MON-DD:HH24:MI:SS';
SET LINES 80;
z i l le this
set wrap on
c e loฺ use
SET PAGES 0;
rem SET TRIMS ON; a
r to
m e
l
SET HEADING OFF;
i l e ( sysdate
c e nsfrom dual;
Z
SELECT '@Start',
l o li
rceset ECHO OFF;
rem SET TERMOUT ON;
arem
M SET ECHO ON;
rem SET FEEDBACK OFF;
rem alter session set tracefile_identifier='noprof';
rem alter session set sql_trace=true;
alter system set cursor_sharing=exact;
set autotrace traceonly statistics;

PROMPT @Statement 1
execute dbms_application_info.set_module('DWH_TEST','1');

SET TIMING ON;


SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 242


AND ((t1.pg_featurevalue_15_id = 1485)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 15 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 2
rem #execute dbms_application_info.set_module('DWH_TEST','2');

SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
ble
WHERE
fe r a
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
ans
)
n - t r
o
an
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 12425)
AND (t2.elementrange_id = 3091) s
ha deฺ
) r )
ฺa Gui
/ m
co ent
PROMPT @1 Results in 0 Ticks
n ฺ
@ ao Stud
z i l le this
PROMPT @Statement 3
c e loฺ use
r to
rem #execute dbms_application_info.set_module('DWH_TEST','3');
a
m e
SELECT DISTINCT
i l l e ( icens
FROM lo
Z
'B' || l
t1.pg_featurevalue_15_id pg_featurevalue_15_id

a rcelu_pg_featurevalue_15 t1,
M lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 49620)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 16 Ticks

PROMPT @Statement 4
rem #execute dbms_application_info.set_module('DWH_TEST','4');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,

Oracle Database 11g: New Features for Administrators 243


lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t1.pg_featurevalue_47_id = 5454)


AND (t2.elementgroup_id = 6624)
)
/
PROMPT @1 Results in 0 Ticks

PROMPT @Statement 5
rem #execute dbms_application_info.set_module('DWH_TEST','5');
ble
fe r a
SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
ans
FROM
n - t r
o
an
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE s
ha deฺ
/* Attribute Joins */ r )
ฺa Gui
((t1.pg_featurevalue_47_id = t2.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
@
AND ((t1.pg_featurevalue_47_id = 16003) ao Stud
z
AND (t2.elementgroup_id = 6624) i l le this
)
c e loฺ use
/
a r to
m
PROMPT @1 Results in 15 Ticks
e
i l l e ( icens
e loZ l
MarcPROMPT @Statement 6
rem #execute dbms_application_info.set_module('DWH_TEST','6');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE

Oracle Database 11g: New Features for Administrators 244


/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)


AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ble
AND (t2.pg_featurevalue_08_id IN (716,717))
fe r a
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
ans
AND (t4.elementrange_id IN (3091,3092))
n - t r
o
an
AND (t5.elementrange_id IN (8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN s
ha deฺ
r )
ฺa Gui
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ m
co ent
)
n ฺ
/* Fact Filters */
AND (t1.project_type_id = '1' @ ao Stud
)
z i l le this
GROUP BY
c e loฺ use
r
t2.pg_featurevalue_13_id,
a to
m
t2.pg_featurevalue_02_id,
e
l e ( icens
t4.elementrange_id,
i l
oZ l
t2.pg_featurevalue_08_id,
e l
t2.pg_featurevalue_01_id,

Marc t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @69 Results in 12078 Ticks

PROMPT @Statement 7
rem #execute dbms_application_info.set_module('DWH_TEST','7');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur

Oracle Database 11g: New Features for Administrators 245


FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
ble
AND (t1.period_id = t6.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_08_id IN (716,717)) m
co ent

AND (t2.pg_featurevalue_02_id IN (4165,4166))
n
AND (t2.pg_featurevalue_13_id = 5424)
@
AND (t4.elementrange_id IN (3091,3092)) ao Stud
z i l le this
AND (t5.elementrange_id IN (8686,8687,8688,8689,8690,8691,8692,8693))

c e loฺ use
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @160 Results in 14344 Ticks

PROMPT @Statement 8
rem #execute dbms_application_info.set_module('DWH_TEST','8');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 246


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
ble
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
fe r a
AND (t1.period_id = t4.value_id)
)
ans
/* Attribute Filters */
n - t r
o
an
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN s
ha deฺ
r )
ฺa Gui
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))) m
co ent
AND (t2.pg_featurevalue_08_id = 717)
n ฺ
AND (t3.elementrange_id IN @ ao Stud
AND (t2.pg_featurevalue_05_id IN (5446,5447))

z i l le this
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671

c e loฺ use
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
r to
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
a
m e
AND (t4.elementgroup_id = 14659)
l e ( icens
AND (t1.period_id IN
i l
oZ l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
e l
ElementGroup Filters */

Marc )
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @46 Results in 24281 Ticks

PROMPT @Statement 9
rem #execute dbms_application_info.set_module('DWH_TEST','9');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 247


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
ble
((t1.item_id = t2.item_id
fe r a
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ans
/* Customizing End */
n - t r
o
an
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
s
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_08_id IN (716,717))
l e ( icens
AND (t2.pg_featurevalue_02_id IN (4165,4166))
i l
oZ l
AND (t2.pg_featurevalue_13_id = 5424)
e l
AND (t4.elementrange_id IN (3091,3092))

Marc AND (t5.elementrange_id IN (8680,8681,8682,8683,8684,8685,8686))


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @179 Results in 12500 Ticks

Oracle Database 11g: New Features for Administrators 248


PROMPT @Statement 10
rem #execute dbms_application_info.set_module('DWH_TEST','10');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_18_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t4.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
ble
lu_elementrange_rel t4
fe r a
WHERE
/* Attribute Joins */
ans
((t1.item_id = t2.item_id
n - t r
o
an
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ s
ha deฺ
AND (t2.pg_featurevalue_18_id = t3.value_id) r )
ฺa Gui
m
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
co ent
AND (t1.period_id = t5.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i
AND ((t2.productgroup_id = 15520) l le this
c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND NOT ((t2.pg_featurevalue_01_id IN
a
m e
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
l e ( icens
97,3891,71,76,89,92,95)))
i l
oZ l
AND (t3.elementgroup_id IN (8902,8903))
e l
AND (t4.elementrange_id IN

Marc(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @40 Results in 1390 Ticks

PROMPT @Statement 11

Oracle Database 11g: New Features for Administrators 249


rem #execute dbms_application_info.set_module('DWH_TEST','11');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
ble
lu_elementrange_rel t4,
fe r a
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
ans
lu_elementrange_rel t5
n - t r
o
an
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id s
ha deฺ
/* Customizing Begin */ r )
ฺa Gui
AND t1.productgroup_id = t2.productgroup_id) m
co ent
/* Customizing End */
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
z i l le this
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)

c e loฺ use
AND (t1.period_id = t6.value_id)
)
a r to
m
/* Attribute Filters */
e
l e ( icens
AND ((t2.productgroup_id = 15520)
i l
oZ l
AND (t1.productgroup_id = 15520) /* Push Down Filters */
e l
AND (t2.pg_featurevalue_01_id IN

Marc(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,

Oracle Database 11g: New Features for Administrators 250


t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @220 Results in 12297 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 12
rem #execute dbms_application_info.set_module('DWH_TEST','12');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
ble
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
fe r a
salesvalueeur
FROM
ans
lu_item_293 t2,
n - t r
o
an
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1, s
ha deฺ
lu_elementgroup_rel t6, r )
ฺa Gui
lu_elementrange_rel t5 m
co ent
WHERE
n ฺ
/* Attribute Joins */
((t1.item_id = t2.item_id @ ao Stud
/* Customizing Begin */
z i l le this
AND
loฺ use
t1.productgroup_id = t2.productgroup_id)
c e
/* Customizing End */
a r to
m e
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
l e ( icens
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
i l
oZ l
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
e l
AND (t1.period_id = t6.value_id)

Marc )
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,

Oracle Database 11g: New Features for Administrators 251


t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @281 Results in 39812 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 13
rem #execute dbms_application_info.set_module('DWH_TEST','13');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
ble
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
fe r a
salesvalueeur
FROM
ans
lu_item_293 t2,
n - t r
o
an
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1, s
ha deฺ
lu_elementgroup_rel t6, r )
ฺa Gui
lu_elementrange_rel t5 m
co ent
WHERE
n ฺ
/* Attribute Joins */
((t1.item_id = t2.item_id @ ao Stud
/* Customizing Begin */
z i l le this
AND
loฺ use
t1.productgroup_id = t2.productgroup_id)
c e
/* Customizing End */
a r to
m e
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
l e ( icens
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
i l
oZ l
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
e l
AND (t1.period_id = t6.value_id)

Marc )
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,

Oracle Database 11g: New Features for Administrators 252


t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @319 Results in 40938 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 14
rem #execute dbms_application_info.set_module('DWH_TEST','14');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'G' || t5.elementgroup_id pg_featurevalue_01_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
ble
'G' || t7.elementgroup_id period_id,
fe r a
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
ans
FROM
n - t r
o
an
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5, s
ha deฺ
lu_elementrange_rel t4, r )
ฺa Gui
fact_pd_out_itm_293 t1, m
co ent
lu_elementgroup_rel t7,
n ฺ
lu_elementrange_rel t6
WHERE @ ao Stud
/* Attribute Joins */
z i l le this
c e loฺ use
((t1.item_id = t2.item_id
/* Customizing Begin */
a r to
AND
m e
t1.productgroup_id = t2.productgroup_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
e l
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)

Marc AND (t2.pg_featurevalue_01_id = t5.value_id)


AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t4.elementrange_id = 3091)
AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 253


GROUP BY
t2.pg_featurevalue_05_id,
t4.elementrange_id,
t5.elementgroup_id,
t6.elementrange_id,
t2.productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t7.elementgroup_id
/
PROMPT @135 Results in 49031 Ticks

PROMPT @Statement 15
rem #execute dbms_application_info.set_module('DWH_TEST','15');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


ble
'r' || t4.elementrange_id pg_featurevalue_15_id,
fe r a
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
ans
'B' || t2.productgroup_id productgroup_id,
n - t r
o
an
'G' || t6.elementgroup_id period_id,

salesvalueeur s
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ha deฺ
FROM r )
ฺa Gui
lu_item_293 t2, m
co ent
lu_pg_featurevalue_15 t3,
n ฺ
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1, @ ao Stud
lu_elementgroup_rel t6,
z i l le this
lu_elementrange_rel t5
c e loฺ use
WHERE
a r to
m
/* Attribute Joins */
e
l e ( icens
((t1.item_id = t2.item_id
i l
oZ l
/* Customizing Begin */
eANDl t1.productgroup_id = t2.productgroup_id)

Marc/* Customizing End */


AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 254


GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
PROMPT @5 Results in 9625 Ticks

PROMPT @Statement 16
rem #execute dbms_application_info.set_module('DWH_TEST','16');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
ble
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
fe r a
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
ans
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
n - t r
o
an
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id, s
ha deฺ
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur m
co ent
FROM
n ฺ
lu_item_293 t2,
lu_pg_featurevalue_15 t3, @ ao Stud
lu_elementrange_rel t4,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t6,
a to
m
lu_elementrange_rel t5
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8664,8665,8666,8667,8668,8669,8670,8671))
AND (t6.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 255


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
ble
/
fe r a
PROMPT @140 Results in 14219 Ticks
ans
n - t r
a no
PROMPT @Statement 17
h a s ฺ
rem #execute dbms_application_info.set_module('DWH_TEST','17');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */ mฺa


r) uide
ฺ c o ent G
'r' || t4.elementrange_id pg_featurevalue_15_id,
a on tud
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

l e@ is S
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_idilproductgroup_id,
l o e th
ฺz period_id,
'G' || t6.elementgroup_id
s
rce to u
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
a
salesvalueeur
FROM
l e (m ense
Zi l
lu_item_293 lic
t2,
l o
elu_elementrange_rel t4,t3,
lu_pg_featurevalue_15
a r c
M fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))

Oracle Database 11g: New Features for Administrators 256


AND (t5.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
ble
/
fe r a
PROMPT @353 Results in 41250 Ticks
ans
n - t r
a no
PROMPT @Statement 18
h a
rem #execute dbms_application_info.set_module('DWH_TEST','18');s ฺ
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */ mฺa
r) uide
ฺ c o ent G
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
a on tud
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

l e i s S
@ pg_featurevalue_08_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
i l t h
ฺz se pg_featurevalue_01_id,
'B' || t2.pg_featurevalue_08_id
l o
'B' || t2.pg_featurevalue_01_id
e u
a rc
'r' || t5.elementrange_id
t o price_eur_id,

l e (m ense period_id,
'B' || t2.productgroup_id
'G' || t6.elementgroup_id
productgroup_id,

Zi l lic
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
l o
rce
salesvalueeur

MaFROM lu_item_293 t2,


lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 257


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t4.elementrange_id IN (3091,3092))


AND (t5.elementrange_id IN (8658,8659,8660,8661,8662,8663,8664))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
ans
t4.elementrange_id,
n - t r
t2.pg_featurevalue_08_id,
a no
t2.pg_featurevalue_01_id,
t5.elementrange_id,
h a s ฺ
t2.productgroup_id,
ฺ a r) uide
/
t6.elementgroup_id
ฺ c om ent G
PROMPT @3 Results in 12578 Ticks
a on tud
l l e@ is S
i
ฺz se th
PROMPT @Statement 19 ce
l o u
a r t o
l e (m ense
rem #execute dbms_application_info.set_module('DWH_TEST','19');

i l
SELECT /*ZORDERED c
liINDEX(t1) USE_HASH(t1) */
l o
rce'B'
'r' || t4.elementrange_id pg_featurevalue_15_id,
a || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
M 'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)

Oracle Database 11g: New Features for Administrators 258


AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
ble
/* Fact Filters */
fe r a
AND (t1.project_type_id = '1'
)
ans
GROUP BY
n - t r
t4.elementrange_id,
a no
t2.pg_featurevalue_01_id,
t5.elementrange_id,
h a s ฺ
t2.productgroup_id,
ฺ a r) uide
/
t6.elementgroup_id
ฺ c om ent G
PROMPT @118 Results in 41453 Ticks
a on tud
l l e@ is S
i
ฺz se th
PROMPT @Statement 20 ce
l o u
a r t o
l e (m ense
rem #execute dbms_application_info.set_module('DWH_TEST','20');

i l
SELECT /*ZORDERED c
liINDEX(t1) USE_HASH(t1) */
l o
rce'B'
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
a || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
M 'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 259


AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8656,8657))
ble
AND (t6.elementgroup_id = 14659)
fe r a
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ans
ElementGroup Filters */
n - t r
o
an
)
/* Fact Filters */
AND (t1.project_type_id = '1' s
ha deฺ
) r )
ฺa Gui
GROUP BY m
co ent
t2.pg_featurevalue_13_id,
n ฺ
t2.pg_featurevalue_02_id,
t4.elementrange_id, @ ao Stud
t2.pg_featurevalue_08_id,
z i l le this
t2.pg_featurevalue_01_id,
c e loฺ use
t5.elementrange_id,
a r to
m
t2.productgroup_id,
e
l e ( icens
t6.elementgroup_id
i l
oZ l
/
e l
PROMPT @0 Results in 4594 Ticks

Marc
PROMPT @Statement 21
rem #execute dbms_application_info.set_module('DWH_TEST','21');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */

Oracle Database 11g: New Features for Administrators 260


((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
ble
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
fe r a
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
ans
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n - t r
o
an
ElementGroup Filters */
)
/* Fact Filters */ s
ha deฺ
AND (t1.project_type_id = '1' r )
ฺa Gui
) m
co ent
GROUP BY
n ฺ
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id, @ ao Stud
t2.pg_featurevalue_08_id,
z i l le this
t3.elementrange_id,
c e loฺ use
t2.productgroup_id,
a r to
m
t4.elementgroup_id
e
/
i l l e ( icens
oZ l
PROMPT @171 Results in 68984 Ticks
e l
arc
M PROMPT @Statement 22
rem #execute dbms_application_info.set_module('DWH_TEST','22');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id

Oracle Database 11g: New Features for Administrators 261


/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
ble
FROM lu_elementgroup_rel g1
fe r a
WHERE
/* ElementGroup Filters */
ans
(g1.elementgroup_id IN (1959,1960,1961,1962))
n - t r
o
an
)

)
)
s
ha deฺ
) r )
ฺa Gui
AND (t3.elementrange_id IN m
co ent

(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
n
@ ao Stud
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
z
AND (t4.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @149 Results in 70531 Ticks

PROMPT @Statement 23
rem #execute dbms_application_info.set_module('DWH_TEST','23');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 262


'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_01_id IN

97,3891,71,76,89,92,95)) s
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ha deฺ
AND (t2.pg_featurevalue_08_id IN (716,717)) r )
ฺa Gui
AND (t2.pg_featurevalue_13_id = 5424) m
co ent
AND (t3.elementrange_id IN (8656,8657))
n ฺ
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
/* Fact Filters */
m e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @1 Results in 4531 Ticks

PROMPT @Statement 24
rem #execute dbms_application_info.set_module('DWH_TEST','24');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

Oracle Database 11g: New Features for Administrators 263


FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95)))
n - t r
o
an
AND (t2.pg_featurevalue_15_id = 1484)
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_05_id = 5447) s
ha deฺ
AND (t3.elementrange_id IN r )
ฺa Gui
m
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
co ent

,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
n
AND (t4.elementgroup_id = 14659) @ ao Stud
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @16 Results in 532 Ticks

PROMPT @Statement 25
rem #execute dbms_application_info.set_module('DWH_TEST','25');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 264


'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ble
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
fe r a
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
ans
)
n - t r
o
an
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */ s
ha deฺ
AND NOT ((t2.pg_featurevalue_01_id IN r )
ฺa Gui
m
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
co ent
97,3891,71,76,89,92,95)))
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
z i l le this
AND (t2.pg_featurevalue_05_id = 5447)

c e loฺ use
AND (t4.elementrange_id = 3091)
r
AND (t5.elementrange_id IN
a to
m e
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
l e ( icens
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
i l
oZ l
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
e l
AND (t6.elementgroup_id = 14659)

Marc AND (t1.period_id IN


(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @77 Results in 8219 Ticks

PROMPT @Statement 26
rem #execute dbms_application_info.set_module('DWH_TEST','26');

Oracle Database 11g: New Features for Administrators 265


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t4.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id) s
ha deฺ
r )
ฺa Gui
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND (t2.pg_featurevalue_01_id IN
r to
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
a
m
97,3891,71,76,89,92,95))
e
l e ( icens
AND (t2.pg_featurevalue_08_id = 717)
i l
oZ l
AND (t2.pg_featurevalue_15_id IN (12425,1485))
e l
AND (t3.elementgroup_id IN (1952,1953))

Marc AND (t4.elementrange_id IN


(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @20 Results in 15000 Ticks

Oracle Database 11g: New Features for Administrators 266


PROMPT @Statement 27
rem #execute dbms_application_info.set_module('DWH_TEST','27');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
ble
lu_elementgroup_rel t4,
fe r a
lu_elementrange_rel t3
WHERE
ans
/* Attribute Joins */
n - t r
o
an
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id) s
ha deฺ
/* Customizing End */ r )
ฺa Gui
m
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
co ent
AND (t1.period_id = t4.value_id)
n ฺ
)
/* Attribute Filters */ @ ao Stud
z i
AND ((t2.productgroup_id = 15520) l le this
c e loฺ use
AND (t1.productgroup_id = 15520) /* Push Down Filters */
r to
AND (t2.pg_featurevalue_01_id IN
a
m e
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
l e ( icens
97,3891,71,76,89,92,95))
i l
oZ l
AND (t2.pg_featurevalue_08_id IN (716,717))
e l
AND (t2.pg_featurevalue_13_id = 5424)

Marc AND (t3.elementrange_id IN


(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695
,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @313 Results in 42485 Ticks

Oracle Database 11g: New Features for Administrators 267


PROMPT @Statement 28
rem #execute dbms_application_info.set_module('DWH_TEST','28');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
ble
lu_elementrange_rel t3
fe r a
WHERE
/* Attribute Joins */
ans
((t1.item_id = t2.item_id
n - t r
o
an
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ s
ha deฺ
r )
ฺa Gui
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND (t2.pg_featurevalue_01_id IN
r to
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
a
m
97,3891,71,76,89,92,95))
e
l e ( icens
AND (t2.pg_featurevalue_15_id IN (1481,1484))
i l
oZ l
AND (t2.pg_featurevalue_05_id IN (5446,5447))
e l
AND (t3.elementrange_id IN

Marc(8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 12641 Ticks

PROMPT @Statement 29

Oracle Database 11g: New Features for Administrators 268


rem #execute dbms_application_info.set_module('DWH_TEST','29');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t3.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_08_id IN (716,717))
l e ( icens
AND (t2.pg_featurevalue_13_id = 5424)
i l
oZ l
AND (t3.elementrange_id IN
e l
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673

Marc,8674,8675,8676,8679))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @318 Results in 42875 Ticks

PROMPT @Statement 30

Oracle Database 11g: New Features for Administrators 269


rem #execute dbms_application_info.set_module('DWH_TEST','30');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t3.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */

AND (t1.period_id = t4.value_id) s


AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ha deฺ
) r )
ฺa Gui
/* Attribute Filters */ m
co ent
AND ((t2.productgroup_id = 15520)
n ฺ
AND (t2.pg_featurevalue_01_id IN @ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */

z i l le this
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
c e loฺ use
r to
AND (t2.pg_featurevalue_15_id IN (1481,1484))
a
m e
AND (t2.pg_featurevalue_05_id IN (5446,5447))
l e ( icens
AND (t3.elementrange_id IN
i l
oZ l
(8671,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686))
e l
AND (t4.elementgroup_id = 14659)

Marc AND (t1.period_id IN


(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @72 Results in 11703 Ticks

PROMPT @Statement 31
rem #execute dbms_application_info.set_module('DWH_TEST','31');

Oracle Database 11g: New Features for Administrators 270


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_08_id = 717)
l e ( icens
AND (t2.pg_featurevalue_15_id IN (12425,1485))
i l
oZ l
AND (t3.elementgroup_id IN (1952,1953))
e l
AND (t4.elementrange_id IN

Marc(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @103 Results in 14610 Ticks

Oracle Database 11g: New Features for Administrators 271


PROMPT @Statement 32
rem #execute dbms_application_info.set_module('DWH_TEST','32');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_15_id IN (1481,1484))
l e ( icens
AND (t2.pg_featurevalue_05_id IN (5446,5447))
i l
oZ l
AND (t3.elementrange_id IN
e l
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671))

Marc AND (t4.elementgroup_id = 14659)


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @299 Results in 11828 Ticks

PROMPT @Statement 33
rem #execute dbms_application_info.set_module('DWH_TEST','33');

Oracle Database 11g: New Features for Administrators 272


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t4.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id) s
ha deฺ
r )
ฺa Gui
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND (t2.pg_featurevalue_01_id IN
r to
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
a
m
97,3891,71,76,89,92,95))
e
l e ( icens
AND (t2.pg_featurevalue_08_id = 717)
i l
oZ l
AND (t2.pg_featurevalue_15_id IN (12425,1485))
e l
AND (t3.elementgroup_id IN (1952,1953))

Marc AND (t4.elementrange_id IN


(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @222 Results in 14875 Ticks

Oracle Database 11g: New Features for Administrators 273


PROMPT @Statement 34
rem #execute dbms_application_info.set_module('DWH_TEST','34');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t5,
lu_elementrange_rel t4
ans
WHERE
n - t r
o
an
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */ s
ha deฺ
AND t1.productgroup_id = t2.productgroup_id) r )
ฺa Gui
/* Customizing End */ m
co ent
AND (t2.pg_featurevalue_13_id = t3.value_id)
n ฺ
AND (t1.period_id = t5.value_id) @ ao Stud
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t2.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND (t2.pg_featurevalue_01_id IN
i l
oZ l
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
e l
97,3891,71,76,89,92,95))

Marc AND (t2.pg_featurevalue_08_id = 717)


AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/

Oracle Database 11g: New Features for Administrators 274


PROMPT @127 Results in 15234 Ticks

PROMPT @Statement 35
rem #execute dbms_application_info.set_module('DWH_TEST','35');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
ble
lu_item_293 t2,
fe r a
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
ans
lu_elementrange_rel t3
n - t r
o
an
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id s
ha deฺ
/* Customizing Begin */ r )
ฺa Gui
AND t1.productgroup_id = t2.productgroup_id) m
co ent
/* Customizing End */
n ฺ
AND (t1.period_id = t4.value_id) @ ao Stud
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t2.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND (t2.pg_featurevalue_01_id IN
i l
oZ l
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
e l
97,3891,71,76,89,92,95))

Marc AND (t2.pg_featurevalue_15_id IN (1481,1484))


AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 2281 Ticks

Oracle Database 11g: New Features for Administrators 275


PROMPT @Statement 36
rem #execute dbms_application_info.set_module('DWH_TEST','36');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t5.elementgroup_id pg_featurevalue_31_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,


'r' || t4.elementrange_id pg_featurevalue_15_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
ble
lu_elementrange_rel t4,
fe r a
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
ans
lu_elementrange_rel t6
n - t r
o
an
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id s
ha deฺ
/* Customizing Begin */ r )
ฺa Gui
AND t1.productgroup_id = t2.productgroup_id) m
co ent
/* Customizing End */
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
z i l le this
AND (t2.pg_featurevalue_31_id = t5.value_id)

c e loฺ use
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
r to
AND (t1.period_id = t7.value_id)
a
)
m e
l e ( icens
/* Attribute Filters */
i l
oZ l
AND ((t2.productgroup_id = 15520)
e l
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Marc AND (t2.pg_featurevalue_09_id IN (5484,5485))


AND (t5.elementgroup_id = 8597)
AND (t4.elementrange_id = 3106)
AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t4.elementrange_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id

Oracle Database 11g: New Features for Administrators 276


/
PROMPT @13 Results in 562 Ticks

PROMPT @Statement 37
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

rem #execute dbms_application_info.set_module('DWH_TEST','37');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
ble
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
fe r a
FROM
lu_item_293 t2,
ans
lu_elementgroup_rel t3,
n - t r
o
an
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins */ m
co ent
((t1.item_id = t2.item_id
n ฺ
/* Customizing Begin */
AND @ ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
z i l le this
c e loฺ use
AND (t2.pg_featurevalue_13_id = t3.value_id)
r to
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
a
m e
AND (t1.period_id = t5.value_id)
)
i l l e ( icens
oZ l
/* Attribute Filters */
e l
AND ((t2.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN (8656,8657))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,

Oracle Database 11g: New Features for Administrators 277


t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @1 Results in 3469 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 38
rem #execute dbms_application_info.set_module('DWH_TEST','38');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'G' || t3.elementgroup_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
ble
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
fe r a
FROM
lu_item_293 t2,
ans
lu_elementgroup_rel t3,
n - t r
o
an
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins */ m
co ent
((t1.item_id = t2.item_id
n ฺ
/* Customizing Begin */
AND @ ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
z i l le this
c e loฺ use
AND (t2.pg_featurevalue_01_id = t3.value_id)
r to
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
a
m e
AND (t1.period_id = t5.value_id)
)
i l l e ( icens
oZ l
/* Attribute Filters */
e l
AND ((t2.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/

Oracle Database 11g: New Features for Administrators 278


PROMPT @172 Results in 76250 Ticks

PROMPT @Statement 39
rem #execute dbms_application_info.set_module('DWH_TEST','39');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_47_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t5,
lu_elementrange_rel t4
ans
WHERE
n - t r
o
an
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */ s
ha deฺ
AND t1.productgroup_id = t2.productgroup_id) r )
ฺa Gui
/* Customizing End */ m
co ent
AND (t2.pg_featurevalue_47_id = t3.value_id)
n ฺ
AND (t1.period_id = t5.value_id) @ ao Stud
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t2.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND NOT ((t2.pg_featurevalue_15_id IN (1474,1481,1483,1484)
i l
oZ l
OR
e l /* ElementGroup Subselect */

Marc (
t2.pg_featurevalue_15_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id = 8507)
)
)
OR
/* ElementRange Subselect */
t2.pg_featurevalue_15_id IN
(SELECT r1.pg_featurevalue_15_id
FROM lu_pg_featurevalue_15 r1,
lu_elementrange_rel r2
WHERE
/* Feature Filter */
(r1.pg_feature_15_id = 977)
/* Attribute Join */
AND (r1.pg_featurevalue_15_num BETWEEN r2.lbound AND r2.ubound)
/* ElementRange Filter */
AND (r2.elementrange_id = 5783)

Oracle Database 11g: New Features for Administrators 279


)
)
)
AND (t3.elementgroup_id = 6624)
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t3.elementgroup_id,
t4.elementrange_id,
ans
t2.productgroup_id,
n - t r
t5.elementgroup_id
a no
/
PROMPT @8 Results in 2781 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
PROMPT @Statement 40
a on tud
l l e@ is S
rem #execute dbms_application_info.set_module('DWH_TEST','40');
i th */
ฺzUSE_HASH(t1)
SELECT /* ORDERED INDEX(t1)
l o e
us pg_featurevalue_13_id,
rce toprice_eur_id,
'B' || t2.pg_featurevalue_13_id
a
l e (m ense productgroup_id,
'r' || t3.elementrange_id
'B' || t2.productgroup_id
'G' || l
Zit4.elementgroup_id
lic period_id,
e l o
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
a r
FROMc
M lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id

Oracle Database 11g: New Features for Administrators 280


FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ble
)
fe r a
/* Fact Filters */
AND (t1.project_type_id = '1'
ans
)
n - t r
GROUP BY
a no
t2.pg_featurevalue_13_id,
t3.elementrange_id,
h a s ฺ
t2.productgroup_id,
ฺ a r) uide
/
t4.elementgroup_id
ฺ c om ent G
PROMPT @40 Results in 92391 Ticks
a on tud
l l e@ is S
i
ฺz se th
PROMPT @Statement 41 ce
l o u
a r t o
l e (m ense
rem #execute dbms_application_info.set_module('DWH_TEST','41');

PROMPT @32 l
ZiResultslicin 3140 Ticks
l o
a rce
M PROMPT @Statement 45
rem #execute dbms_application_info.set_module('DWH_TEST','45');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(

Oracle Database 11g: New Features for Administrators 281


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t6.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
ble
MAX(t1.pd_distribution_factor) distributionfactor,
fe r a
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
ans
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
n - t r
o
an
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +

/* Additional Columns Begin */ s


ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
ha deฺ
r )
ฺa Gui
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d m
co ent
/* Additional Columns End */
n ฺ
FROM
lu_item_293 t5, @ ao Stud
lu_elementgroup_rel t6,
z i l le this
c e loฺ use
fact_pd_out_itm_293 t1,
r
lu_elementgroup_rel t7,
a to
m
lu_outlet_293 t2,
e
l e ( icens
lu_elementgroup_rel t3,
i l
oZ l
lu_elementgroup_rel t4
e l
WHERE

Marc /* Attribute Joins */


((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_01_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_02_id = 4165)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))

Oracle Database 11g: New Features for Administrators 282


AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ble
)
fe r a
GROUP BY
t2.ch_featurevalue_09_id,
ans
t3.elementgroup_id,
n - t r
o
an
t5.pg_featurevalue_02_id,
t6.elementgroup_id,
t4.elementgroup_id, s
ha deฺ
t5.productgroup_id, r )
ฺa Gui
t7.elementgroup_id, m
co ent
t2.outlet_id,
n ฺ
t1.project_id,
/* Additional GroupBys Begin */ @ ao Stud
z i l le this
t1.project_id, t1.period_id, t1.outlet_id

c e loฺ use
/* Additional GroupBys End */
) tt1
a r to
GROUP BY
m e
l e ( icens
tt1.ch_featurevalue_09_id,
i l
oZ l
tt1.ch_featurevalue_02_elgr_id,
e l
tt1.pg_featurevalue_02_id,

Marc tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @10 Results in 1188 Ticks

set timing off;


-- set module info to null
execute dbms_application_info.set_module(NULL, NULL);

PROMPT we are done


set autotrace off;
set echo on;
set termout on;
SELECT '@End', sysdate from dual;
spool off;

FIN!

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 283


/home/oracle/solutions/SPAbig/old2_wrkl10g_jfv.sh:
#!/bin/ksh

export ORACLE_SID=db10g
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1

export
PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
sr/X11R6/bin

sqlplus sys/oracle as sysdba <<FIN!

-- as sysdba flush the shared pool


ALTER system flush buffer_cache;
ble
ALTER system flush shared_pool;
fe r a
ans
-- connect as dwh_test
n - t r
o
an
CONNECT apps/apps;
set echo on;
spool /tmp/dwh_test.log; s
ha deฺ
-- Generated on Thu Sep 18 20:38:59 2003 r )
ฺa Gui
m
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY:MON-DD:HH24:MI:SS';
co ent
SET LINES 80;
n ฺ
set wrap on
SET PAGES 0; @ ao Stud
rem SET TRIMS ON;
z i l le this
SET HEADING OFF;
c e loฺ use
r to
SELECT '@Start', sysdate from dual;
a
m
rem SET TERMOUT ON;
e
l e ( icens
rem set ECHO OFF;
i l
oZ l
SET ECHO ON;
e l
rem SET FEEDBACK OFF;

Marcrem alter session set tracefile_identifier='noprof';


rem alter session set sql_trace=true;
alter system set cursor_sharing=exact;
set autotrace traceonly statistics;

PROMPT @Statement 1
execute dbms_application_info.set_module('DWH_TEST','1');

SET TIMING ON;


SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 1485)
AND (t2.elementrange_id = 3091)
)

Oracle Database 11g: New Features for Administrators 284


/
PROMPT @1 Results in 15 Ticks

PROMPT @Statement 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

rem #execute dbms_application_info.set_module('DWH_TEST','2');

SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
ble
)
fe r a
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 12425)
ans
AND (t2.elementrange_id = 3091)
n - t r
o
an
)
/
PROMPT @1 Results in 0 Ticks s
ha deฺ
r )
ฺa Gui
m
co ent
n ฺ
PROMPT @Statement 3
@ ao Stud
rem #execute dbms_application_info.set_module('DWH_TEST','3');
z i l le this
SELECT DISTINCT
c e loฺ use pg_featurevalue_15_id
r to
'B' || t1.pg_featurevalue_15_id
a
FROM
m e
l e ( icenst2t1,
lu_pg_featurevalue_15
i l
Z l
lu_elementrange_rel
WHERE lo
e
Ma/*rcAttribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 49620)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 16 Ticks

PROMPT @Statement 4
rem #execute dbms_application_info.set_module('DWH_TEST','4');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE
/* Attribute Joins */

Oracle Database 11g: New Features for Administrators 285


((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 5454)
AND (t2.elementgroup_id = 6624)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
PROMPT @1 Results in 0 Ticks

PROMPT @Statement 5
rem #execute dbms_application_info.set_module('DWH_TEST','5');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
ble
FROM
fe r a
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
ans
WHERE
n - t r
o
an
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
) s
ha deฺ
/* Attribute Filters */ r )
ฺa Gui
AND ((t1.pg_featurevalue_47_id = 16003) m
co ent
AND (t2.elementgroup_id = 6624)
n ฺ
/
)
@ ao Stud
PROMPT @1 Results in 15 Ticks
z i l le this
c e loฺ use
a r to
m
( 6 ens e
l
PROMPT @Statement
i l edbms_application_info.set_module('DWH_TEST','6');
Z
rem #execute
l o lic
a rce'B'/*||ORDERED
SELECT INDEX(t1) USE_HASH(t1) */
M t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */

Oracle Database 11g: New Features for Administrators 286


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
ble
AND (t4.elementrange_id IN (3091,3092))
fe r a
AND (t5.elementrange_id IN (8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
ans
AND (t1.period_id IN
n - t r
o
an
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
) s
ha deฺ
/* Fact Filters */ r )
ฺa Gui
AND (t1.project_type_id = '1' m
co ent
)
n ฺ
GROUP BY
t2.pg_featurevalue_13_id, @ ao Stud
t2.pg_featurevalue_02_id,
z i l le this
t4.elementrange_id,
c e loฺ use
r
t2.pg_featurevalue_08_id,
a to
m
t2.pg_featurevalue_01_id,
e
l e ( icens
t5.elementrange_id,
i l
oZ l
t2.productgroup_id,
e l
t6.elementgroup_id

Marc/
PROMPT @69 Results in 12078 Ticks

PROMPT @Statement 7
rem #execute dbms_application_info.set_module('DWH_TEST','7');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,

Oracle Database 11g: New Features for Administrators 287


lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
ble
AND ((t2.productgroup_id = 15520)
fe r a
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
ans
n
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2 - t r
o
an
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166)) s
ha deฺ
AND (t2.pg_featurevalue_13_id = 5424) r )
ฺa Gui
AND (t4.elementrange_id IN (3091,3092)) m
co ent

AND (t5.elementrange_id IN (8686,8687,8688,8689,8690,8691,8692,8693))
n
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
/* Fact Filters */
m e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @160 Results in 14344 Ticks

PROMPT @Statement 8
rem #execute dbms_application_info.set_module('DWH_TEST','8');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 288


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
ble
/* Attribute Filters */
fe r a
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ans
AND NOT ((t2.pg_featurevalue_01_id IN
n - t r
o
an
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id = 717) s
ha deฺ
AND (t2.pg_featurevalue_05_id IN (5446,5447)) r )
ฺa Gui
AND (t3.elementrange_id IN m
co ent

(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
n
@ ao Stud
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
z
AND (t4.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @46 Results in 24281 Ticks

PROMPT @Statement 9
rem #execute dbms_application_info.set_module('DWH_TEST','9');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,

Oracle Database 11g: New Features for Administrators 289


'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ble
/* Customizing End */
fe r a
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
ans
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
n - t r
o
an
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95)) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l le this
AND (t2.pg_featurevalue_08_id IN (716,717))

c e loฺ use
AND (t2.pg_featurevalue_02_id IN (4165,4166))
r to
AND (t2.pg_featurevalue_13_id = 5424)
a
m e
AND (t4.elementrange_id IN (3091,3092))
l e ( icens
AND (t5.elementrange_id IN (8680,8681,8682,8683,8684,8685,8686))
i l
oZ l
AND (t6.elementgroup_id = 14659)
e l
AND (t1.period_id IN

Marc(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @179 Results in 12500 Ticks

PROMPT @Statement 10
rem #execute dbms_application_info.set_module('DWH_TEST','10');

Oracle Database 11g: New Features for Administrators 290


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t3.elementgroup_id pg_featurevalue_18_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
ble
((t1.item_id = t2.item_id
fe r a
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ans
/* Customizing End */
n - t r
o
an
AND (t2.pg_featurevalue_18_id = t3.value_id)

AND (t1.period_id = t5.value_id) s


AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ha deฺ
) r )
ฺa Gui
/* Attribute Filters */ m
co ent
AND ((t2.productgroup_id = 15520)
n ฺ
AND NOT ((t2.pg_featurevalue_01_id IN @ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */

z i l le this
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
c e loฺ use
r to
AND (t3.elementgroup_id IN (8902,8903))
a
m
AND (t4.elementrange_id IN
e
l e ( icens
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
i l
oZ l
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
e l
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

Marc AND (t5.elementgroup_id = 14659)


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @40 Results in 1390 Ticks

PROMPT @Statement 11
rem #execute dbms_application_info.set_module('DWH_TEST','11');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */

Oracle Database 11g: New Features for Administrators 291


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
ble
lu_elementrange_rel t5
fe r a
WHERE
/* Attribute Joins */
ans
((t1.item_id = t2.item_id
n - t r
o
an
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ s
ha deฺ
r )
ฺa Gui
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
m
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
co ent

AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
n
AND (t1.period_id = t6.value_id)
) @ ao Stud
/* Attribute Filters */
z i l le this
c e loฺ use
AND ((t2.productgroup_id = 15520)
r to
AND (t1.productgroup_id = 15520) /* Push Down Filters */
a
m e
AND (t2.pg_featurevalue_01_id IN
l e ( icens
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
i l
oZ l
97,3891,71,76,89,92,95))
e l
AND (t2.pg_featurevalue_08_id IN (716,717))

Marc AND (t2.pg_featurevalue_02_id IN (4165,4166))


AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/

Oracle Database 11g: New Features for Administrators 292


PROMPT @220 Results in 12297 Ticks

PROMPT @Statement 12
rem #execute dbms_application_info.set_module('DWH_TEST','12');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
ble
lu_item_293 t2,
fe r a
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
ans
fact_pd_out_itm_293 t1,
n - t r
o
an
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE s
ha deฺ
/* Attribute Joins */ r )
ฺa Gui
((t1.item_id = t2.item_id m
co ent
/* Customizing Begin */
n ฺ
AND
ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ @
z i l le this
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

c e loฺ use
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
r to
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
a
m e
AND (t1.period_id = t6.value_id)
)
i l l e ( icens
oZ l
/* Attribute Filters */
e l
AND ((t2.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/

Oracle Database 11g: New Features for Administrators 293


PROMPT @281 Results in 39812 Ticks

PROMPT @Statement 13
rem #execute dbms_application_info.set_module('DWH_TEST','13');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
ble
lu_item_293 t2,
fe r a
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
ans
fact_pd_out_itm_293 t1,
n - t r
o
an
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE s
ha deฺ
/* Attribute Joins */ r )
ฺa Gui
((t1.item_id = t2.item_id m
co ent
/* Customizing Begin */
n ฺ
AND
ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ @
z i l le this
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

c e loฺ use
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
r to
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
a
m e
AND (t1.period_id = t6.value_id)
)
i l l e ( icens
oZ l
/* Attribute Filters */
e l
AND ((t2.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/

Oracle Database 11g: New Features for Administrators 294


PROMPT @319 Results in 40938 Ticks

PROMPT @Statement 14
rem #execute dbms_application_info.set_module('DWH_TEST','14');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'G' || t5.elementgroup_id pg_featurevalue_01_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
ble
FROM
fe r a
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
ans
lu_elementgroup_rel t5,
n - t r
o
an
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7, s
ha deฺ
lu_elementrange_rel t6 r )
ฺa Gui
WHERE m
co ent
/* Attribute Joins */
n ฺ
((t1.item_id = t2.item_id
/* Customizing Begin */ @ ao Stud
AND
z i l le this
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
c e loฺ use
r to
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
a
m e
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
l e ( icens
AND (t2.pg_featurevalue_01_id = t5.value_id)
i l
oZ l
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
e l
AND (t1.period_id = t7.value_id)

Marc )
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t4.elementrange_id = 3091)
AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t4.elementrange_id,

Oracle Database 11g: New Features for Administrators 295


t5.elementgroup_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @135 Results in 49031 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 15
rem #execute dbms_application_info.set_module('DWH_TEST','15');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
ble
'B' || t2.productgroup_id productgroup_id,
fe r a
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ans
salesvalueeur
n - t r
o
an
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3, s
ha deฺ
lu_elementrange_rel t4, r )
ฺa Gui
fact_pd_out_itm_293 t1, m
co ent
lu_elementgroup_rel t6,
n ฺ
lu_elementrange_rel t5
WHERE @ ao Stud
/* Attribute Joins */
z i l le this
c e loฺ use
((t1.item_id = t2.item_id
/* Customizing Begin */
a r to
AND
m e
t1.productgroup_id = t2.productgroup_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
e l
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)

Marc AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)


AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 296


t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @5 Results in 9625 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 16
rem #execute dbms_application_info.set_module('DWH_TEST','16');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
ble
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
fe r a
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
ans
'G' || t6.elementgroup_id period_id,
n - t r
o
an
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM s
ha deฺ
lu_item_293 t2, r )
ฺa Gui
lu_pg_featurevalue_15 t3, m
co ent
lu_elementrange_rel t4,
n ฺ
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6, @ ao Stud
lu_elementrange_rel t5
z i l le this
WHERE
c e loฺ use
/* Attribute Joins */
a r to
m e
((t1.item_id = t2.item_id
l e ( icens
/* Customizing Begin */
i l
oZ l
AND t1.productgroup_id = t2.productgroup_id)
e l
/* Customizing End */

Marc AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)


AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8664,8665,8666,8667,8668,8669,8670,8671))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */

Oracle Database 11g: New Features for Administrators 297


AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @140 Results in 14219 Ticks

ble
PROMPT @Statement 17
fe r a
rem #execute dbms_application_info.set_module('DWH_TEST','17');
ans
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
n - t r
o
an
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id, s
ha deฺ
'B' || t2.productgroup_id productgroup_id, r )
ฺa Gui
'G' || t6.elementgroup_id period_id, m
co ent

SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
n
salesvalueeur
FROM @ ao Stud
lu_item_293 t2,
z i l le this
lu_pg_featurevalue_15 t3,
c e loฺ use
r
lu_elementrange_rel t4,
a to
m
fact_pd_out_itm_293 t1,
e
l e ( icens
lu_elementgroup_rel t6,
i l
oZ l
lu_elementrange_rel t5
e
WHEREl
Marc/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 298


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @353 Results in 41250 Ticks

ble
fe r a
PROMPT @Statement 18
ans
rem #execute dbms_application_info.set_module('DWH_TEST','18');
n - t r
o
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
s an
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
r ) ha deฺ
m
'r' || t4.elementrange_id pg_featurevalue_15_id,ฺa Gui
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

ฺ co ent
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
n
@ ao Stud
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
z i l le this
'B' || t2.productgroup_id productgroup_id,

c e loฺ use
'G' || t6.elementgroup_id period_id,
r to
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
a
salesvalueeur
m e
FROM
i l l e ( icens
oZ l
lu_item_293 t2,
e l
lu_pg_featurevalue_15 t3,

Marc lu_elementrange_rel t4,


fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))

Oracle Database 11g: New Features for Administrators 299


AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8658,8659,8660,8661,8662,8663,8664))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
ble
t2.pg_featurevalue_08_id,
fe r a
t2.pg_featurevalue_01_id,
t5.elementrange_id,
ans
t2.productgroup_id,
n - t r
t6.elementgroup_id
a no
/
PROMPT @3 Results in 12578 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
PROMPT @Statement 19
a on tud
l l e@ is S
rem #execute dbms_application_info.set_module('DWH_TEST','19');
i
ฺzUSE_HASH(t1) th */
SELECT /* ORDERED INDEX(t1)
l o us e
rce topg_featurevalue_15_id,
'r' || t4.elementrange_id
a
( m s e
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

'B' ||Z le licen


'r' || t5.elementrange_id
ilt2.productgroup_id
price_eur_id,
productgroup_id,
e l
'G' o || t6.elementgroup_id period_id,
arc SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
M salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)

Oracle Database 11g: New Features for Administrators 300


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
ble
t4.elementrange_id,
fe r a
t2.pg_featurevalue_01_id,
t5.elementrange_id,
ans
t2.productgroup_id,
n - t r
t6.elementgroup_id
a no
/
PROMPT @118 Results in 41453 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
PROMPT @Statement 20
a on tud
l l e@ is S
rem #execute dbms_application_info.set_module('DWH_TEST','20');
i
ฺzUSE_HASH(t1) th */
SELECT /* ORDERED INDEX(t1)
l o s e
rce to u pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_13_id
a
( m s e
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

'B' ||Z le licen


'r' || t4.elementrange_id pg_featurevalue_15_id,
ilt2.pg_featurevalue_08_id pg_featurevalue_08_id,
e l
'B' o || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Marc 'r' || t5.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)

Oracle Database 11g: New Features for Administrators 301


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ble
)
fe r a
/* Fact Filters */
AND (t1.project_type_id = '1'
ans
)
n - t r
GROUP BY
a no
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
h a s ฺ
t4.elementrange_id,
ฺ a r) uide
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id, ฺ c om ent G
t5.elementrange_id,
a on tud
t2.productgroup_id,
l l e@ is S
t6.elementgroup_id i
ฺz se th
/
l o
rce to u
PROMPT @0 Results in 4594 Ticks
a
l e (m ense
Zi l lic
PROMPTlo@Statement 21
a rce#execute dbms_application_info.set_module('DWH_TEST','21');
rem
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */

Oracle Database 11g: New Features for Administrators 302


AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.pg_featurevalue_08_id IN (716,717))


AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ble
ElementGroup Filters */
fe r a
)
/* Fact Filters */
ans
AND (t1.project_type_id = '1'
n - t r
)
a no
GROUP BY
t2.pg_featurevalue_02_id,
h a s ฺ
t2.pg_featurevalue_15_id,
ฺ a r) uide
t2.pg_featurevalue_08_id,
t3.elementrange_id, ฺ c om ent G
t2.productgroup_id,
a on tud
t4.elementgroup_id
l l e@ is S
/ i
ฺz se th
l o
PROMPT @171 Results in 68984 Ticks

a rce to u
l e (m ense
l
Zi dbms_application_info.set_module('DWH_TEST','22');
PROMPT @Statement li22c
l o
ce
rem #execute
a r
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

Oracle Database 11g: New Features for Administrators 303


AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.pg_featurevalue_15_id IN (12425,1485))


AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
ble
)
fe r a
)
)
ans
)
n - t r
o
an
AND (t3.elementrange_id IN
s
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
ha deฺ
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699)) r )
ฺa Gui
AND (t4.elementgroup_id = 14659) m
co ent
AND (t1.period_id IN
n ฺ
ElementGroup Filters */ @ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

)
z i l le this
/* Fact Filters */
c e loฺ use
r
AND (t1.project_type_id = '1'
a to
)
m e
GROUP BY
i l l e ( icens
oZ l
t2.pg_featurevalue_02_id,
e l
t2.pg_featurevalue_15_id,

Marc t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @149 Results in 70531 Ticks

PROMPT @Statement 23
rem #execute dbms_application_info.set_module('DWH_TEST','23');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM

Oracle Database 11g: New Features for Administrators 304


lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ble
AND (t2.pg_featurevalue_01_id IN
fe r a
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
ans
AND (t2.pg_featurevalue_08_id IN (716,717))
n - t r
o
an
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659) s
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t2.pg_featurevalue_13_id,
e
l e ( icens
t2.pg_featurevalue_08_id,
i l
oZ l
t2.pg_featurevalue_01_id,
e l
t3.elementrange_id,

Marc t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @1 Results in 4531 Ticks

PROMPT @Statement 24
rem #execute dbms_application_info.set_module('DWH_TEST','24');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,

Oracle Database 11g: New Features for Administrators 305


lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
ble
AND (t2.pg_featurevalue_15_id = 1484)
fe r a
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_05_id = 5447)
ans
AND (t3.elementrange_id IN
n - t r
o
an
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671

,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699)) s
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
ha deฺ
AND (t4.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t2.pg_featurevalue_05_id,
i l
oZ l
t2.pg_featurevalue_02_id,
e l
t2.pg_featurevalue_15_id,

Marc t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @16 Results in 532 Ticks

PROMPT @Statement 25
rem #execute dbms_application_info.set_module('DWH_TEST','25');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,

Oracle Database 11g: New Features for Administrators 306


lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
ble
/* Attribute Filters */
fe r a
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ans
AND NOT ((t2.pg_featurevalue_01_id IN
n - t r
o
an
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id IN (716,717)) s
ha deฺ
AND (t2.pg_featurevalue_02_id IN (4165,4166)) r )
ฺa Gui
AND (t2.pg_featurevalue_05_id = 5447) m
co ent
AND (t4.elementrange_id = 3091)
n ฺ
AND (t5.elementrange_id IN
@ ao Stud
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
z i l le this
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689

c e loฺ use
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
r to
AND (t6.elementgroup_id = 14659)
a
m
AND (t1.period_id IN
e
l e ( icens
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
i l
oZ l
ElementGroup Filters */
e l)

Marc/* Fact Filters */


AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @77 Results in 8219 Ticks

PROMPT @Statement 26
rem #execute dbms_application_info.set_module('DWH_TEST','26');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 307


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
ans
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95)) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l
AND (t2.pg_featurevalue_08_id = 717)le this
c e loฺ use
AND (t2.pg_featurevalue_15_id IN (12425,1485))
r to
AND (t3.elementgroup_id IN (1952,1953))
a
m
AND (t4.elementrange_id IN
e
l e ( icens
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
i l
oZ l
AND (t5.elementgroup_id = 14659)
e l
AND (t1.period_id IN

Marc(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @20 Results in 15000 Ticks

PROMPT @Statement 27
rem #execute dbms_application_info.set_module('DWH_TEST','27');

Oracle Database 11g: New Features for Administrators 308


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || t4.elementgroup_id period_id,


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
ble
((t1.item_id = t2.item_id
fe r a
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ans
/* Customizing End */
n - t r
o
an
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
) s
ha deฺ
/* Attribute Filters */ r )
ฺa Gui
AND ((t2.productgroup_id = 15520) m
co ent

AND (t1.productgroup_id = 15520) /* Push Down Filters */
n
AND (t2.pg_featurevalue_01_id IN
@ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
z i l le this
c e loฺ use
AND (t2.pg_featurevalue_08_id IN (716,717))
r to
AND (t2.pg_featurevalue_13_id = 5424)
a
m
AND (t3.elementrange_id IN
e
l e ( icens
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695
i l
oZ l
,8696,8697,8698,8699))
e l
AND (t4.elementgroup_id = 14659)

Marc AND (t1.period_id IN


(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @313 Results in 42485 Ticks

PROMPT @Statement 28
rem #execute dbms_application_info.set_module('DWH_TEST','28');

Oracle Database 11g: New Features for Administrators 309


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || t4.elementgroup_id period_id,


SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
ble
/* Customizing Begin */
fe r a
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
ans
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
n - t r
o
an
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95)) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l le this
AND (t2.pg_featurevalue_15_id IN (1481,1484))

c e loฺ use
AND (t2.pg_featurevalue_05_id IN (5446,5447))
r
AND (t3.elementrange_id IN
a to
m e
(8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
l e ( icens
AND (t4.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 12641 Ticks

PROMPT @Statement 29
rem #execute dbms_application_info.set_module('DWH_TEST','29');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,

Oracle Database 11g: New Features for Administrators 310


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ans
AND (t1.period_id = t4.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN m
co ent

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
n
97,3891,71,76,89,92,95))
@ ao Stud
AND (t2.pg_featurevalue_08_id IN (716,717))
z i l le this
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN
c e loฺ use
r to
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673
a
m
,8674,8675,8676,8679))
e
l e ( icens
AND (t4.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @318 Results in 42875 Ticks

PROMPT @Statement 30
rem #execute dbms_application_info.set_module('DWH_TEST','30');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,

Oracle Database 11g: New Features for Administrators 311


'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ble
/* Customizing End */
fe r a
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
ans
)
n - t r
o
an
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */ s
ha deฺ
AND (t2.pg_featurevalue_01_id IN r )
ฺa Gui
m
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
co ent
97,3891,71,76,89,92,95))
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
z i l le this
c e loฺ use
(8671,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686))
r to
AND (t4.elementgroup_id = 14659)
a
m
AND (t1.period_id IN
e
l e ( icens
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
i l
oZ l
ElementGroup Filters */
e l)

Marc/* Fact Filters */


AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @72 Results in 11703 Ticks

PROMPT @Statement 31
rem #execute dbms_application_info.set_module('DWH_TEST','31');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 312


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ble
/* Customizing End */
fe r a
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ans
AND (t1.period_id = t5.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN m
co ent

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
n
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717) @ ao Stud
z i l le this
AND (t2.pg_featurevalue_15_id IN (12425,1485))

c e loฺ use
AND (t3.elementgroup_id IN (1952,1953))
r
AND (t4.elementrange_id IN
a to
m e
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
l e ( icens
AND (t5.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @103 Results in 14610 Ticks

PROMPT @Statement 32
rem #execute dbms_application_info.set_module('DWH_TEST','32');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */

Oracle Database 11g: New Features for Administrators 313


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ans
AND (t1.period_id = t4.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN m
co ent

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
n
97,3891,71,76,89,92,95))
@ ao Stud
AND (t2.pg_featurevalue_15_id IN (1481,1484))
z i l le this
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
c e loฺ use
r to
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671))
a
m e
AND (t4.elementgroup_id = 14659)
l e ( icens
AND (t1.period_id IN
i l
oZ l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
e l
ElementGroup Filters */

Marc )
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @299 Results in 11828 Ticks

PROMPT @Statement 33
rem #execute dbms_application_info.set_module('DWH_TEST','33');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 314


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
ans
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND (t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95)) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l
AND (t2.pg_featurevalue_08_id = 717)le this
c e loฺ use
AND (t2.pg_featurevalue_15_id IN (12425,1485))
r to
AND (t3.elementgroup_id IN (1952,1953))
a
m
AND (t4.elementrange_id IN
e
l e ( icens
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
i l
oZ l
AND (t5.elementgroup_id = 14659)
e l
AND (t1.period_id IN

Marc(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @222 Results in 14875 Ticks

PROMPT @Statement 34
rem #execute dbms_application_info.set_module('DWH_TEST','34');

Oracle Database 11g: New Features for Administrators 315


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_08_id = 717)
l e ( icens
AND (t2.pg_featurevalue_15_id IN (12425,1485))
i l
oZ l
AND (t3.elementgroup_id IN (1952,1953))
e l
AND (t4.elementrange_id IN

Marc(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @127 Results in 15234 Ticks

Oracle Database 11g: New Features for Administrators 316


PROMPT @Statement 35
rem #execute dbms_application_info.set_module('DWH_TEST','35');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_15_id IN (1481,1484))
l e ( icens
AND (t2.pg_featurevalue_05_id IN (5446,5447))
i l
oZ l
AND (t3.elementrange_id IN (8656,8657))
e l
AND (t4.elementgroup_id = 14659)

Marc AND (t1.period_id IN


(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 2281 Ticks

PROMPT @Statement 36
rem #execute dbms_application_info.set_module('DWH_TEST','36');

Oracle Database 11g: New Features for Administrators 317


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t5.elementgroup_id pg_featurevalue_31_id,
'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'G' || t7.elementgroup_id period_id,


SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_elementrange_rel t6
ble
WHERE
fe r a
/* Attribute Joins */
((t1.item_id = t2.item_id
ans
/* Customizing Begin */
n - t r
o
an
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
s
ha deฺ
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
r )
ฺa Gui
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t2.pg_featurevalue_31_id = t5.value_id) m
co ent

AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
n
AND (t1.period_id = t7.value_id)
) @ ao Stud
/* Attribute Filters */
z i l le this
c e loฺ use
AND ((t2.productgroup_id = 15520)
r to
AND (t1.productgroup_id = 15520) /* Push Down Filters */
a
m e
AND (t2.pg_featurevalue_09_id IN (5484,5485))
l e ( icens
AND (t5.elementgroup_id = 8597)
i l
oZ l
AND (t4.elementrange_id = 3106)
e l
AND (t6.elementrange_id IN

Marc(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t4.elementrange_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @13 Results in 562 Ticks

Oracle Database 11g: New Features for Administrators 318


PROMPT @Statement 37
rem #execute dbms_application_info.set_module('DWH_TEST','37');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t5,
lu_elementrange_rel t4
ans
WHERE
n - t r
o
an
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */ s
ha deฺ
AND t1.productgroup_id = t2.productgroup_id) r )
ฺa Gui
/* Customizing End */ m
co ent
AND (t2.pg_featurevalue_13_id = t3.value_id)
n ฺ
AND (t1.period_id = t5.value_id) @ ao Stud
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t2.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND (t2.pg_featurevalue_01_id IN
i l
oZ l
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
e l
97,3891,71,76,89,92,95))

Marc AND (t2.pg_featurevalue_08_id = 717)


AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN (8656,8657))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @1 Results in 3469 Ticks

Oracle Database 11g: New Features for Administrators 319


PROMPT @Statement 38
rem #execute dbms_application_info.set_module('DWH_TEST','38');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'G' || t3.elementgroup_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
ble
fact_pd_out_itm_293 t1,
fe r a
lu_elementgroup_rel t5,
lu_elementrange_rel t4
ans
WHERE
n - t r
o
an
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */ s
ha deฺ
AND t1.productgroup_id = t2.productgroup_id) r )
ฺa Gui
/* Customizing End */ m
co ent
AND (t2.pg_featurevalue_01_id = t3.value_id)
n ฺ
AND (t1.period_id = t5.value_id) @ ao Stud
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t2.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND (t2.pg_featurevalue_13_id = 5424)
i l
oZ l
AND (t3.elementgroup_id IN (1959,1960,1961,1962,8574))
e l
AND (t4.elementrange_id IN

Marc(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @172 Results in 76250 Ticks

Oracle Database 11g: New Features for Administrators 320


PROMPT @Statement 39
rem #execute dbms_application_info.set_module('DWH_TEST','39');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_47_id,
'r' || t4.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */
AND (t2.pg_featurevalue_47_id = t3.value_id)
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z i l le this
AND NOT ((t2.pg_featurevalue_15_id IN (1474,1481,1483,1484)
OR
c e loฺ use
r to
/* ElementGroup Subselect */
a
(
m e
i l l e ( icens
t2.pg_featurevalue_15_id IN

oZ l
(SELECT g1.value_id
e l FROM lu_elementgroup_rel g1

Marc WHERE
/* ElementGroup Filters */
(g1.elementgroup_id = 8507)
)
)
OR
/* ElementRange Subselect */
t2.pg_featurevalue_15_id IN
(SELECT r1.pg_featurevalue_15_id
FROM lu_pg_featurevalue_15 r1,
lu_elementrange_rel r2
WHERE
/* Feature Filter */
(r1.pg_feature_15_id = 977)
/* Attribute Join */
AND (r1.pg_featurevalue_15_num BETWEEN r2.lbound AND r2.ubound)
/* ElementRange Filter */
AND (r2.elementrange_id = 5783)
)
)
)
AND (t3.elementgroup_id = 6624)

Oracle Database 11g: New Features for Administrators 321


AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
ble
t5.elementgroup_id
fe r a
/
PROMPT @8 Results in 2781 Ticks
ans
n - t r
a no
PROMPT @Statement 40
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','40');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ c om ent G
a on tud
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,

l e@ is S
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_idilproductgroup_id,
l o e th
ฺz period_id,
'G' || t4.elementgroup_id
s
a rce to u
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
l
lu_item_293 e (m
t2,
e n se
Zi l lic t1,
fact_pd_out_itm_293
l o
elu_elementrange_rel t4,
lu_elementgroup_rel
r c
MaWHERE
t3

/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))

Oracle Database 11g: New Features for Administrators 322


)
)
)
)
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t2.pg_featurevalue_13_id,
t3.elementrange_id,
ans
t2.productgroup_id,
n - t r
t4.elementgroup_id
a no
/
PROMPT @40 Results in 92391 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
a on tud
SELECT
l e i s S
@ ch_featurevalue_09_id,
i l h
ฺz se t ch_featurevalue_02_id,
'B' || tt1.ch_featurevalue_09_id
l o
'G' || tt1.ch_featurevalue_02_elgr_id
e u
a rc t o
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,

( m s e
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,

'B' ||Z le licen


'G' || tt1.countrychannel_elgr_id
iltt1.productgroup_id
countrychannel_id,
productgroup_id,
e l
'G' o || tt1.period_elgr_id period_id,

Marc SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,


SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable JFV
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
t8.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,

Oracle Database 11g: New Features for Administrators 323


SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin JFV */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End JFV */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
ble
lu_elementgroup_rel t8,
fe r a
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
ans
lu_elementgroup_rel t9,
n - t r
o
an
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins JFV */ m
co ent
((t1.outlet_id = t2.outlet_id
n ฺ
/* Customizing Begin JFV */
AND t1.period_id = t2.period_id @ ao Stud
AND
z i l le this
t1.project_id = t2.project_id)
/* Customizing End */
c e loฺ use
r to
AND (t2.ch_featurevalue_02_id = t3.value_id)
a
m e
AND (t2.country_channel_id = t4.value_id)
l e ( icens
AND (t1.item_id = t5.item_id
i l
oZ l
/* Customizing Begin */
e lAND t1.productgroup_id = t5.productgroup_id)

Marc /* Customizing End */


AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters JFV */
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)

Oracle Database 11g: New Features for Administrators 324


/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND t1.project_type_id = '1'


)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t7.elementrange_id,
t8.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id,
t9.elementgroup_id,
ble
t2.outlet_id,
fe r a
t1.project_id,
/* Additional GroupBys Begin */
ans
t1.project_id, t1.period_id, t1.outlet_id
n - t r
/* Additional GroupBys End */
a no
) tt1
GROUP BY
h a s ฺ
tt1.ch_featurevalue_09_id,
ฺ a r) uide
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id, ฺ c om ent G
tt1.pg_featurevalue_01_elgr_id,
a on tud
tt1.countrychannel_elgr_id,
l l e@ is S
tt1.productgroup_id, i
ฺz se th
tt1.period_elgr_id
l o
/
a rce to u
l e (m ense
Zi l lic
PROMPTlo@Statement 45
a rce#execute dbms_application_info.set_module('DWH_TEST','45');
rem
M SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,

Oracle Database 11g: New Features for Administrators 325


t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t6.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
ble
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
fe r a
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
ans
/* Additional Columns Begin */
n - t r
o
an
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */ s
ha deฺ
FROM r )
ฺa Gui
lu_item_293 t5, m
co ent
lu_elementgroup_rel t6,
n ฺ
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7, @ ao Stud
lu_outlet_293 t2,
z i l le this
c e loฺ use
lu_elementgroup_rel t3,
r
lu_elementgroup_rel t4
a to
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.outlet_id = t2.outlet_id
e l
/* Customizing Begin */

Marc AND
AND
t1.period_id = t2.period_id
t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_01_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_02_id = 4165)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */

Oracle Database 11g: New Features for Administrators 326


AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
ble
t3.elementgroup_id,
fe r a
t5.pg_featurevalue_02_id,
t6.elementgroup_id,
ans
t4.elementgroup_id,
n - t r
o
an
t5.productgroup_id,
t7.elementgroup_id,
t2.outlet_id, s
ha deฺ
t1.project_id, r )
ฺa Gui
/* Additional GroupBys Begin */ m
co ent

t1.project_id, t1.period_id, t1.outlet_id
n
/* Additional GroupBys End */
) tt1 @ ao Stud
GROUP BY
z i l le this
tt1.ch_featurevalue_09_id,
c e loฺ use
r to
tt1.ch_featurevalue_02_elgr_id,
a
m
tt1.pg_featurevalue_02_id,
e
l e ( icens
tt1.pg_featurevalue_01_elgr_id,
i l
oZ l
tt1.countrychannel_elgr_id,
e l
tt1.productgroup_id,

Marc/
tt1.period_elgr_id

PROMPT @10 Results in 1188 Ticks

set timing off;


-- set module info to null
execute dbms_application_info.set_module(NULL, NULL);

PROMPT we are done


set autotrace off;
set echo on;
set termout on;
SELECT '@End', sysdate from dual;
spool off;

FIN!

----------------------------------------------------------

/home/oracle/solutions/SPAbig/old_wrkl10g_jfv.sh:
#!/bin/ksh

Oracle Database 11g: New Features for Administrators 327


export ORACLE_SID=db10g

export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1

export
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
sr/X11R6/bin

sqlplus sys/oracle as sysdba <<FIN!

-- as sysdba flush the shared pool


ALTER system flush buffer_cache;
ALTER system flush shared_pool;

ble
-- connect as dwh_test
fe r a
CONNECT apps/apps;
set echo on;
ans
spool /tmp/dwh_test.log;
n - t r
o
an
-- Generated on Thu Sep 18 20:38:59 2003
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY:MON-DD:HH24:MI:SS';
SET LINES 80; s
ha deฺ
set wrap on r )
ฺa Gui
SET PAGES 0; m
co ent
rem SET TRIMS ON;
n ฺ
SET HEADING OFF;
SELECT '@Start', sysdate from dual; @ ao Stud
rem SET TERMOUT ON;
z i l le this
rem set ECHO OFF;
c e loฺ use
SET ECHO ON;
a r to
m
rem SET FEEDBACK OFF;
e
l e ( icens
rem alter session set tracefile_identifier='noprof';
i l
oZ l
rem alter session set sql_trace=true;
e l
alter system set cursor_sharing=exact;
arc
set autotrace traceonly statistics;
M PROMPT @Statement 1
execute dbms_application_info.set_module('DWH_TEST','1');

SET TIMING ON;


SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 1485)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 15 Ticks

Oracle Database 11g: New Features for Administrators 328


PROMPT @Statement 2
rem #execute dbms_application_info.set_module('DWH_TEST','2');

SELECT DISTINCT
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id


FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 12425)
ble
AND (t2.elementrange_id = 3091)
fe r a
/
)
ans
PROMPT @1 Results in 0 Ticks
n - t r
a no
h a s ฺ
PROMPT @Statement 3
ฺ a r) uide
ฺ c om ent G
rem #execute dbms_application_info.set_module('DWH_TEST','3');

SELECT DISTINCT
a on tud
'B' || t1.pg_featurevalue_15_id
l l e@ is S
pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15ot1,
i
ฺz se th
l
lu_elementrange_rel
a rcet2 to u
WHERE
/* Attribute e
l (m */ense
Joins
Zi l lic
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
e l o
)
a
/* cAttribute
rAND Filters */
M AND
((t1.pg_featurevalue_15_id = 49620)
(t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 16 Ticks

PROMPT @Statement 4
rem #execute dbms_application_info.set_module('DWH_TEST','4');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 329


AND ((t1.pg_featurevalue_47_id = 5454)
AND (t2.elementgroup_id = 6624)
)
/
PROMPT @1 Results in 0 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 5
rem #execute dbms_application_info.set_module('DWH_TEST','5');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
ble
WHERE
fe r a
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
ans
)
n - t r
o
an
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 16003)
AND (t2.elementgroup_id = 6624) s
ha deฺ
) r )
ฺa Gui
/ m
co ent
PROMPT @1 Results in 15 Ticks
n ฺ
@ ao Stud
z i l le this
PROMPT @Statement 6
c e loฺ use
r to
rem #execute dbms_application_info.set_module('DWH_TEST','6');
a
m e
l
SELECT /* ORDERED
i l e ( iINDEX(t1)
c e ns USE_HASH(t1) */

l o Z
'B' || l
t2.pg_featurevalue_13_id pg_featurevalue_13_id,

rce'r'
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
a || t4.elementrange_id pg_featurevalue_15_id,
M 'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

Oracle Database 11g: New Features for Administrators 330


AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
ble
AND (t1.period_id IN
fe r a
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ans
)
n - t r
o
an
/* Fact Filters */
AND (t1.project_type_id = '1'
) s
ha deฺ
GROUP BY r )
ฺa Gui
t2.pg_featurevalue_13_id, m
co ent
t2.pg_featurevalue_02_id,
n ฺ
t4.elementrange_id,
t2.pg_featurevalue_08_id, @ ao Stud
t2.pg_featurevalue_01_id,
z i l le this
t5.elementrange_id,
c e loฺ use
t2.productgroup_id,
a r to
m
t6.elementgroup_id
e
/
i l l e ( icens
oZ l
PROMPT @69 Results in 12078 Ticks
e l
arc
M PROMPT @Statement 7
rem #execute dbms_application_info.set_module('DWH_TEST','7');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,

Oracle Database 11g: New Features for Administrators 331


lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
ble
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
fe r a
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
ans
AND (t2.pg_featurevalue_02_id IN (4165,4166))
n - t r
o
an
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
s
ha deฺ
AND (t5.elementrange_id IN (8686,8687,8688,8689,8690,8691,8692,8693))
AND (t6.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t2.pg_featurevalue_13_id,
i l
oZ l
t2.pg_featurevalue_02_id,
e l
t4.elementrange_id,

Marc t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @160 Results in 14344 Ticks

PROMPT @Statement 8
rem #execute dbms_application_info.set_module('DWH_TEST','8');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM

Oracle Database 11g: New Features for Administrators 332


lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ble
AND NOT ((t2.pg_featurevalue_01_id IN
fe r a
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
ans
AND (t2.pg_featurevalue_08_id = 717)
n - t r
o
an
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
s
ha deฺ
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
r )
ฺa Gui
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
m
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
co ent
AND (t4.elementgroup_id = 14659)
n ฺ
AND (t1.period_id IN
@ ao Stud
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
z i l le this
)
c e loฺ use
/* Fact Filters */
a r to
m e
AND (t1.project_type_id = '1'
)
i l l e ( icens
oZ l
GROUP BY
e l
t2.pg_featurevalue_05_id,

Marc t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @46 Results in 24281 Ticks

PROMPT @Statement 9
rem #execute dbms_application_info.set_module('DWH_TEST','9');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 333


SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ble
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
fe r a
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
ans
)
n - t r
o
an
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */ s
ha deฺ
AND (t2.pg_featurevalue_01_id IN r )
ฺa Gui
m
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
co ent
97,3891,71,76,89,92,95))
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
z i l le this
AND (t2.pg_featurevalue_13_id = 5424)

c e loฺ use
AND (t4.elementrange_id IN (3091,3092))
r to
AND (t5.elementrange_id IN (8680,8681,8682,8683,8684,8685,8686))
a
m e
AND (t6.elementgroup_id = 14659)
l e ( icens
AND (t1.period_id IN
i l
oZ l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
e l
ElementGroup Filters */

Marc )
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @179 Results in 12500 Ticks

PROMPT @Statement 10
rem #execute dbms_application_info.set_module('DWH_TEST','10');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */

Oracle Database 11g: New Features for Administrators 334


'G' || t3.elementgroup_id pg_featurevalue_18_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_18_id = t3.value_id)
ans
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */ s
ha deฺ
AND ((t2.productgroup_id = 15520) r )
ฺa Gui
m
AND (t1.productgroup_id = 15520) /* Push Down Filters */
co ent
AND NOT ((t2.pg_featurevalue_01_id IN
n ฺ
97,3891,71,76,89,92,95))) @ ao Stud
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2

z i l le this
AND (t3.elementgroup_id IN (8902,8903))
AND (t4.elementrange_id IN
c e loฺ use
r to
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
a
m e
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
l e ( icens
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
i l
oZ l
AND (t5.elementgroup_id = 14659)
e l
AND (t1.period_id IN

Marc(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @40 Results in 1390 Ticks

PROMPT @Statement 11
rem #execute dbms_application_info.set_module('DWH_TEST','11');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

Oracle Database 11g: New Features for Administrators 335


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
s
ha deฺ
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
r )
ฺa Gui
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND (t2.pg_featurevalue_01_id IN
r to
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
a
m
97,3891,71,76,89,92,95))
e
l e ( icens
AND (t2.pg_featurevalue_08_id IN (716,717))
i l
oZ l
AND (t2.pg_featurevalue_02_id IN (4165,4166))
e l
AND (t2.pg_featurevalue_13_id = 5424)

Marc AND (t4.elementrange_id IN (3091,3092))


AND (t5.elementrange_id IN (8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @220 Results in 12297 Ticks

Oracle Database 11g: New Features for Administrators 336


PROMPT @Statement 12
rem #execute dbms_application_info.set_module('DWH_TEST','12');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t4.elementrange_id pg_featurevalue_15_id,


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
ble
lu_elementrange_rel t4,
fe r a
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
ans
lu_elementrange_rel t5
n - t r
o
an
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id s
ha deฺ
/* Customizing Begin */ r )
ฺa Gui
AND t1.productgroup_id = t2.productgroup_id) m
co ent
/* Customizing End */
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
z i l le this
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)

c e loฺ use
AND (t1.period_id = t6.value_id)
)
a r to
m
/* Attribute Filters */
e
l e ( icens
AND ((t2.productgroup_id = 15520)
i l
oZ l
AND (t1.productgroup_id = 15520) /* Push Down Filters */
e l
AND (t2.pg_featurevalue_01_id IN

Marc(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @281 Results in 39812 Ticks

Oracle Database 11g: New Features for Administrators 337


PROMPT @Statement 13
rem #execute dbms_application_info.set_module('DWH_TEST','13');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || t4.elementrange_id pg_featurevalue_15_id,


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
ble
lu_elementrange_rel t4,
fe r a
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
ans
lu_elementrange_rel t5
n - t r
o
an
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id s
ha deฺ
/* Customizing Begin */ r )
ฺa Gui
AND t1.productgroup_id = t2.productgroup_id) m
co ent
/* Customizing End */
n ฺ
@ ao Stud
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
z i l le this
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)

c e loฺ use
AND (t1.period_id = t6.value_id)
)
a r to
m
/* Attribute Filters */
e
l e ( icens
AND ((t2.productgroup_id = 15520)
i l
oZ l
AND (t1.productgroup_id = 15520) /* Push Down Filters */
e l
AND (t2.pg_featurevalue_01_id IN

Marc(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @319 Results in 40938 Ticks

Oracle Database 11g: New Features for Administrators 338


PROMPT @Statement 14
rem #execute dbms_application_info.set_module('DWH_TEST','14');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,


'r' || t4.elementrange_id pg_featurevalue_15_id,
'G' || t5.elementgroup_id pg_featurevalue_01_id,
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
ble
lu_pg_featurevalue_15 t3,
fe r a
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
ans
fact_pd_out_itm_293 t1,
n - t r
o
an
lu_elementgroup_rel t7,
lu_elementrange_rel t6
WHERE s
ha deฺ
/* Attribute Joins */ r )
ฺa Gui
((t1.item_id = t2.item_id m
co ent
/* Customizing Begin */
n ฺ
AND
ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ @
z i l le this
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

c e loฺ use
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
r to
AND (t2.pg_featurevalue_01_id = t5.value_id)
a
m e
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
l e ( icens
AND (t1.period_id = t7.value_id)
i l
oZ l
)
e l
/* Attribute Filters */

Marc AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t4.elementrange_id = 3091)
AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t4.elementrange_id,
t5.elementgroup_id,
t6.elementrange_id,

Oracle Database 11g: New Features for Administrators 339


t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @135 Results in 49031 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 15
rem #execute dbms_application_info.set_module('DWH_TEST','15');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
ble
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
fe r a
salesvalueeur
FROM
ans
lu_item_293 t2,
n - t r
o
an
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1, s
ha deฺ
lu_elementgroup_rel t6, r )
ฺa Gui
lu_elementrange_rel t5 m
co ent
WHERE
n ฺ
/* Attribute Joins */
((t1.item_id = t2.item_id @ ao Stud
/* Customizing Begin */
z i l le this
AND
loฺ use
t1.productgroup_id = t2.productgroup_id)
c e
/* Customizing End */
a r to
m e
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
l e ( icens
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
i l
oZ l
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
e l
AND (t1.period_id = t6.value_id)

Marc )
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,

Oracle Database 11g: New Features for Administrators 340


t6.elementgroup_id
/
PROMPT @5 Results in 9625 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 16
rem #execute dbms_application_info.set_module('DWH_TEST','16');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
ble
'B' || t2.productgroup_id productgroup_id,
fe r a
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ans
salesvalueeur
n - t r
o
an
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3, s
ha deฺ
lu_elementrange_rel t4, r )
ฺa Gui
fact_pd_out_itm_293 t1, m
co ent
lu_elementgroup_rel t6,
n ฺ
lu_elementrange_rel t5
WHERE @ ao Stud
/* Attribute Joins */
z i l le this
c e loฺ use
((t1.item_id = t2.item_id
/* Customizing Begin */
a r to
AND
m e
t1.productgroup_id = t2.productgroup_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
e l
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)

Marc AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)


AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8664,8665,8666,8667,8668,8669,8670,8671))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 341


GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @140 Results in 14219 Ticks

PROMPT @Statement 17
rem #execute dbms_application_info.set_module('DWH_TEST','17');
ble
fe r a
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'r' || t4.elementrange_id pg_featurevalue_15_id,
ans
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
n - t r
o
an
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id, s
ha deฺ
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur m
co ent
FROM
n ฺ
lu_item_293 t2,
lu_pg_featurevalue_15 t3, @ ao Stud
lu_elementrange_rel t4,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t6,
a to
m
lu_elementrange_rel t5
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)

Oracle Database 11g: New Features for Administrators 342


/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @353 Results in 41250 Ticks

PROMPT @Statement 18
rem #execute dbms_application_info.set_module('DWH_TEST','18');
ble
fe r a
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
ans
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
n - t r
o
an
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id, s
ha deฺ
'r' || t5.elementrange_id price_eur_id, r )
ฺa Gui
'B' || t2.productgroup_id productgroup_id, m
co ent
'G' || t6.elementgroup_id period_id,
n ฺ
salesvalueeur @ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM
z i l le this
lu_item_293 t2,
c e loฺ use
r
lu_pg_featurevalue_15 t3,
a to
m
lu_elementrange_rel t4,
e
l e ( icens
fact_pd_out_itm_293 t1,
i l
oZ l
lu_elementgroup_rel t6,
e l
lu_elementrange_rel t5

MarcWHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8658,8659,8660,8661,8662,8663,8664))

Oracle Database 11g: New Features for Administrators 343


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.project_type_id = '1'


)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @3 Results in 12578 Ticks
ans
n - t r
a no
PROMPT @Statement 19
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','19');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ c om ent G
a on tud
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id
l e@ is S
pg_featurevalue_01_id,
'r' || t5.elementrange_idilprice_eur_id,
l o e th
ฺz productgroup_id,
us
'B' || t2.productgroup_id
rce toperiod_id,
'G' || t6.elementgroup_id
a
salesvalueeure (m
l e n se
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM Zi l lic
l o
rcelu_pg_featurevalue_15
lu_item_293 t2,
a
M lu_elementrange_rel t4,
t3,

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))

Oracle Database 11g: New Features for Administrators 344


AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @118 Results in 41453 Ticks
ans
n - t r
a no
PROMPT @Statement 20
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','20');

c
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ om ent G
a on tud
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id
l e@ is S
pg_featurevalue_02_id,
'r' || t4.elementrange_idilpg_featurevalue_15_id,
l o
'B' || t2.pg_featurevalue_08_id th
ฺz se pg_featurevalue_08_id,
rce toprice_eur_id,
u pg_featurevalue_01_id,
'B' || t2.pg_featurevalue_01_id
a
l e (m ense productgroup_id,
'r' || t5.elementrange_id
'B' || t2.productgroup_id
'G' || l
Zit6.elementgroup_id
lic period_id,
l o
ce
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
a r
salesvalueeur
M FROM lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 345


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t4.elementrange_id IN (3091,3092))


AND (t5.elementrange_id IN (8656,8657))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
ans
t4.elementrange_id,
n - t r
t2.pg_featurevalue_08_id,
a no
t2.pg_featurevalue_01_id,
t5.elementrange_id,
h a s ฺ
t2.productgroup_id,
ฺ a r) uide
/
t6.elementgroup_id
ฺ c om ent G
PROMPT @0 Results in 4594 Ticks
a on tud
l l e@ is S
i
ฺz se th
PROMPT @Statement 21 ce
l o u
a r t o
l e (m ense
rem #execute dbms_application_info.set_module('DWH_TEST','21');

i l
SELECT /*ZORDERED c
liINDEX(t1) USE_HASH(t1) */
l o
rce'B'
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
a || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
M 'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 346


AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t3.elementrange_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
ble
)
fe r a
GROUP BY
t2.pg_featurevalue_02_id,
ans
t2.pg_featurevalue_15_id,
n - t r
t2.pg_featurevalue_08_id,
a no
t3.elementrange_id,
t2.productgroup_id,
h a s ฺ
t4.elementgroup_id
ฺ a r) uide
/
PROMPT @171 Results in 68984 Ticks ฺ c om ent G
a on tud
l l e@ is S
i
ฺz se th
PROMPT @Statement 22
l o
rce to u
rem #execute dbms_application_info.set_module('DWH_TEST','22');
a
l
SELECT /* ORDEREDe e se USE_HASH(t1) */
(mINDEX(t1)
n
'B' || l
Zit2.pg_featurevalue_02_id
lic pg_featurevalue_02_id,
l o
rce'B'
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
a || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
M 'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)

Oracle Database 11g: New Features for Administrators 347


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND NOT ((/* ElementGroup Subselect */
(
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
)
)
ble
AND (t3.elementrange_id IN
fe r a
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
ans
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
n - t r
o
an
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
s
ha deฺ
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ r )
ฺa Gui
) m
co ent
/* Fact Filters */
n ฺ
AND (t1.project_type_id = '1'
) @ ao Stud
GROUP BY
z i l le this
t2.pg_featurevalue_02_id,
c e loฺ use
r
t2.pg_featurevalue_15_id,
a to
m
t2.pg_featurevalue_08_id,
e
l e ( icens
t3.elementrange_id,
i l
oZ l
t2.productgroup_id,
e l
t4.elementgroup_id

Marc/
PROMPT @149 Results in 70531 Ticks

PROMPT @Statement 23
rem #execute dbms_application_info.set_module('DWH_TEST','23');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3

Oracle Database 11g: New Features for Administrators 348


WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)


AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
ble
AND (t2.pg_featurevalue_13_id = 5424)
fe r a
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659)
ans
AND (t1.period_id IN
n - t r
o
an
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
) s
ha deฺ
/* Fact Filters */ r )
ฺa Gui
AND (t1.project_type_id = '1' m
co ent
)
n ฺ
GROUP BY
t2.pg_featurevalue_13_id, @ ao Stud
t2.pg_featurevalue_08_id,
z i l le this
t2.pg_featurevalue_01_id,
c e loฺ use
t3.elementrange_id,
a r to
m
t2.productgroup_id,
e
l e ( icens
t4.elementgroup_id
i l
oZ l
/
e l
PROMPT @1 Results in 4531 Ticks

Marc
PROMPT @Statement 24
rem #execute dbms_application_info.set_module('DWH_TEST','24');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id

Oracle Database 11g: New Features for Administrators 349


/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_15_id = 1484)
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_05_id = 5447)
AND (t3.elementrange_id IN
ble
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
fe r a
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
ans
AND (t4.elementgroup_id = 14659)
n - t r
o
an
AND (t1.period_id IN

ElementGroup Filters */ s
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ha deฺ
) r )
ฺa Gui
/* Fact Filters */ m
co ent
AND (t1.project_type_id = '1'
n ฺ
)
GROUP BY @ ao Stud
t2.pg_featurevalue_05_id,
z i l le this
t2.pg_featurevalue_02_id,
c e loฺ use
r
t2.pg_featurevalue_15_id,
a to
m
t3.elementrange_id,
e
l e ( icens
t2.productgroup_id,
i l
oZ l
t4.elementgroup_id
/
e l
MarcPROMPT @16 Results in 532 Ticks

PROMPT @Statement 25
rem #execute dbms_application_info.set_module('DWH_TEST','25');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,

Oracle Database 11g: New Features for Administrators 350


lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
ble
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
fe r a
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id IN (716,717))
ans
AND (t2.pg_featurevalue_02_id IN (4165,4166))
n - t r
o
an
AND (t2.pg_featurevalue_05_id = 5447)
AND (t4.elementrange_id = 3091)
AND (t5.elementrange_id IN s
ha deฺ
r )
ฺa Gui
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
m
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
co ent

,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
n
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
/* Fact Filters */
m e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @77 Results in 8219 Ticks

PROMPT @Statement 26
rem #execute dbms_application_info.set_module('DWH_TEST','26');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 351


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_08_id = 717) m
co ent

AND (t2.pg_featurevalue_15_id IN (12425,1485))
n
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN @ ao Stud
z i l le this
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

c e loฺ use
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @20 Results in 15000 Ticks

PROMPT @Statement 27
rem #execute dbms_application_info.set_module('DWH_TEST','27');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 352


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
ble
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
fe r a
AND (t1.period_id = t4.value_id)
)
ans
/* Attribute Filters */
n - t r
o
an
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN s
ha deฺ
r )
ฺa Gui
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) m
co ent
AND (t2.pg_featurevalue_08_id IN (716,717))
n ฺ
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN @ ao Stud
z i l le this
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695
,8696,8697,8698,8699))
c e loฺ use
r to
AND (t4.elementgroup_id = 14659)
a
m
AND (t1.period_id IN
e
l e ( icens
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
i l
oZ l
ElementGroup Filters */
e l)

Marc/* Fact Filters */


AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @313 Results in 42485 Ticks

PROMPT @Statement 28
rem #execute dbms_application_info.set_module('DWH_TEST','28');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Oracle Database 11g: New Features for Administrators 353


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ble
AND (t1.period_id = t4.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_15_id IN (1481,1484)) m
co ent

AND (t2.pg_featurevalue_05_id IN (5446,5447))
n
AND (t3.elementrange_id IN
@ ao Stud
(8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
z
AND (t4.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 12641 Ticks

PROMPT @Statement 29
rem #execute dbms_application_info.set_module('DWH_TEST','29');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 354


'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_01_id IN

97,3891,71,76,89,92,95)) s
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ha deฺ
AND (t2.pg_featurevalue_08_id IN (716,717)) r )
ฺa Gui
AND (t2.pg_featurevalue_13_id = 5424) m
co ent
AND (t3.elementrange_id IN
n ฺ
,8674,8675,8676,8679)) @ ao Stud
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673

z
AND (t4.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @318 Results in 42875 Ticks

PROMPT @Statement 30
rem #execute dbms_application_info.set_module('DWH_TEST','30');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 355


'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
ble
/* Attribute Filters */
fe r a
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
ans
AND (t2.pg_featurevalue_01_id IN
n - t r
o
an
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484)) s
ha deฺ
AND (t2.pg_featurevalue_05_id IN (5446,5447)) r )
ฺa Gui
AND (t3.elementrange_id IN m
co ent

(8671,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686))
n
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
/* Fact Filters */
m e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @72 Results in 11703 Ticks

PROMPT @Statement 31
rem #execute dbms_application_info.set_module('DWH_TEST','31');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,

Oracle Database 11g: New Features for Administrators 356


SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_01_id IN

97,3891,71,76,89,92,95)) s
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ha deฺ
AND (t2.pg_featurevalue_08_id = 717) r )
ฺa Gui
AND (t2.pg_featurevalue_15_id IN (12425,1485)) m
co ent
AND (t3.elementgroup_id IN (1952,1953))
n ฺ
AND (t4.elementrange_id IN
@ ao Stud
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
z
AND (t5.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @103 Results in 14610 Ticks

PROMPT @Statement 32
rem #execute dbms_application_info.set_module('DWH_TEST','32');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,

Oracle Database 11g: New Features for Administrators 357


'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_01_id IN

97,3891,71,76,89,92,95)) s
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ha deฺ
AND (t2.pg_featurevalue_15_id IN (1481,1484)) r )
ฺa Gui
AND (t2.pg_featurevalue_05_id IN (5446,5447)) m
co ent
AND (t3.elementrange_id IN
n ฺ
AND (t4.elementgroup_id = 14659) @ ao Stud
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671))

AND (t1.period_id IN
z i l le this
c e loฺ use
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
a r to
)
m e
l e ( icens
/* Fact Filters */
i l
oZ l
AND (t1.project_type_id = '1'
e l)

MarcGROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @299 Results in 11828 Ticks

PROMPT @Statement 33
rem #execute dbms_application_info.set_module('DWH_TEST','33');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,

Oracle Database 11g: New Features for Administrators 358


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ble
AND (t1.period_id = t5.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
s
ha deฺ
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)) r )
ฺa Gui
AND (t2.pg_featurevalue_08_id = 717) m
co ent

AND (t2.pg_featurevalue_15_id IN (12425,1485))
n
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN @ ao Stud
z i l le this
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))

c e loฺ use
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @222 Results in 14875 Ticks

PROMPT @Statement 34
rem #execute dbms_application_info.set_module('DWH_TEST','34');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 359


'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ble
/* Customizing End */
fe r a
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ans
AND (t1.period_id = t5.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN m
co ent

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
n
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717) @ ao Stud
z i l le this
AND (t2.pg_featurevalue_15_id IN (12425,1485))

c e loฺ use
AND (t3.elementgroup_id IN (1952,1953))
r
AND (t4.elementrange_id IN
a to
m e
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
l e ( icens
AND (t5.elementgroup_id = 14659)
i l
oZ l
AND (t1.period_id IN
e l
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved

MarcElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @127 Results in 15234 Ticks

PROMPT @Statement 35
rem #execute dbms_application_info.set_module('DWH_TEST','35');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */

Oracle Database 11g: New Features for Administrators 360


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ans
AND (t1.period_id = t4.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN m
co ent

(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
n
97,3891,71,76,89,92,95))
@ ao Stud
AND (t2.pg_featurevalue_15_id IN (1481,1484))
z i l le this
AND (t2.pg_featurevalue_05_id IN (5446,5447))

c e loฺ use
AND (t3.elementrange_id IN (8656,8657))
r to
AND (t4.elementgroup_id = 14659)
a
m
AND (t1.period_id IN
e
l e ( icens
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
i l
oZ l
ElementGroup Filters */
e l)

Marc/* Fact Filters */


AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 2281 Ticks

PROMPT @Statement 36
rem #execute dbms_application_info.set_module('DWH_TEST','36');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t5.elementgroup_id pg_featurevalue_31_id,
'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 361


'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_elementrange_rel t6
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
ble
AND t1.productgroup_id = t2.productgroup_id)
fe r a
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
ans
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
n - t r
o
an
AND (t2.pg_featurevalue_31_id = t5.value_id)

AND (t1.period_id = t7.value_id) s


AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
ha deฺ
) r )
ฺa Gui
/* Attribute Filters */ m
co ent
AND ((t2.productgroup_id = 15520)
n ฺ
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_09_id IN (5484,5485))
z
AND (t5.elementgroup_id = 8597) i l le this
c e loฺ use
AND (t4.elementrange_id = 3106)
r
AND (t6.elementrange_id IN
a to
m e
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
l e ( icens
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
i l
oZ l
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
e l
AND (t7.elementgroup_id = 14659)

Marc AND (t1.period_id IN


(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t4.elementrange_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @13 Results in 562 Ticks

PROMPT @Statement 37
rem #execute dbms_application_info.set_module('DWH_TEST','37');

Oracle Database 11g: New Features for Administrators 362


SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_08_id = 717)
l e ( icens
AND (t2.pg_featurevalue_15_id IN (12425,1485))
i l
oZ l
AND (t3.elementgroup_id IN (1952,1953))
e l
AND (t4.elementrange_id IN (8656,8657))

Marc AND (t5.elementgroup_id = 14659)


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @1 Results in 3469 Ticks

PROMPT @Statement 38

Oracle Database 11g: New Features for Administrators 363


rem #execute dbms_application_info.set_module('DWH_TEST','38');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'G' || t3.elementgroup_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.productgroup_id productgroup_id,


'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
ble
/* Attribute Joins */
fe r a
((t1.item_id = t2.item_id
/* Customizing Begin */
ans
AND t1.productgroup_id = t2.productgroup_id)
n - t r
o
an
/* Customizing End */
AND (t2.pg_featurevalue_01_id = t3.value_id)
s
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z i l le this
AND (t2.pg_featurevalue_13_id = 5424)

c e loฺ use
AND (t3.elementgroup_id IN (1959,1960,1961,1962,8574))
r
AND (t4.elementrange_id IN
a to
m e
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
l e ( icens
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
i l
oZ l
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
e l
AND (t5.elementgroup_id = 14659)

Marc AND (t1.period_id IN


(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @172 Results in 76250 Ticks

PROMPT @Statement 39
rem #execute dbms_application_info.set_module('DWH_TEST','39');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */

Oracle Database 11g: New Features for Administrators 364


'G' || t3.elementgroup_id pg_featurevalue_47_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t5.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
lu_elementgroup_rel t3,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t5,
lu_elementrange_rel t4
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ble
/* Customizing End */
fe r a
AND (t2.pg_featurevalue_47_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
ans
AND (t1.period_id = t5.value_id)
n - t r
o
an
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) s
ha deฺ
r )
ฺa Gui
AND (t1.productgroup_id = 15520) /* Push Down Filters */
m
AND NOT ((t2.pg_featurevalue_15_id IN (1474,1481,1483,1484)
co ent
OR
n ฺ
/* ElementGroup Subselect */
( @ ao Stud
z i l le this
t2.pg_featurevalue_15_id IN

c e loฺ use
(SELECT g1.value_id
FROM
a r to
lu_elementgroup_rel g1
m
WHERE
e
i l l e ( icens
/* ElementGroup Filters */

oZ l (g1.elementgroup_id = 8507)
e l )

Marc )
OR
/* ElementRange Subselect */
t2.pg_featurevalue_15_id IN
(SELECT r1.pg_featurevalue_15_id
FROM lu_pg_featurevalue_15 r1,
lu_elementrange_rel r2
WHERE
/* Feature Filter */
(r1.pg_feature_15_id = 977)
/* Attribute Join */
AND (r1.pg_featurevalue_15_num BETWEEN r2.lbound AND r2.ubound)
/* ElementRange Filter */
AND (r2.elementrange_id = 5783)
)
)
)
AND (t3.elementgroup_id = 6624)
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

Oracle Database 11g: New Features for Administrators 365


AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.project_type_id = '1'


)
GROUP BY
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @8 Results in 2781 Ticks

ble
fe r a
PROMPT @Statement 40
ans
rem #execute dbms_application_info.set_module('DWH_TEST','40');
n - t r
o
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
s an
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
r ) ha deฺ
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id, m ฺa Gui
'G' || t4.elementgroup_id period_id,
n ฺ co ent
FROM @ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

lu_item_293 t2,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t4,
a to
m
lu_elementrange_rel t3
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id IN (1959,1960,1961,1962))
)
)
)
)

Oracle Database 11g: New Features for Administrators 366


AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementrange_id,
t2.productgroup_id,
ble
t4.elementgroup_id
fe r a
/
PROMPT @40 Results in 92391 Ticks
ans
n - t r
a no
PROMPT @Statement 41
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','41');

SELECT ฺ c om ent G
a on ch_featurevalue_02_id,
tud
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id @ S
le this pg_featurevalue_15_id,
z i l
'r' || tt1.pg_featurevalue_15_elrg_id

c e loฺ use countrychannel_id,


'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
r to productgroup_id,
'G' || tt1.countrychannel_elgr_id
a
m
'B' || tt1.productgroup_id
e
l e ( icens period_id,
'G' || tt1.period_elgr_id
i l
l o Z l
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,

r c eSUM(tt1.distributionfactor*tt1.dissalesflag)
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,

Ma SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
selloutletsavg,

FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
t8.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,

Oracle Database 11g: New Features for Administrators 367


SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
ble
lu_elementgroup_rel t8,
fe r a
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
ans
lu_elementgroup_rel t9,
n - t r
o
an
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4 s
ha deฺ
WHERE r )
ฺa Gui
/* Attribute Joins */ m
co ent
((t1.outlet_id = t2.outlet_id
n ฺ
/* Customizing Begin */
AND t1.period_id = t2.period_id @ ao Stud
AND
z i l le this
t1.project_id = t2.project_id)
/* Customizing End */
c e loฺ use
r to
AND (t2.ch_featurevalue_02_id = t3.value_id)
a
m e
AND (t2.country_channel_id = t4.value_id)
l e ( icens
AND (t1.item_id = t5.item_id
i l
oZ l
/* Customizing Begin */
e lAND t1.productgroup_id = t5.productgroup_id)

Marc /* Customizing End */


AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)

Oracle Database 11g: New Features for Administrators 368


/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND t1.project_type_id = '1'


)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t7.elementrange_id,
t8.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id,
t9.elementgroup_id,
ble
t2.outlet_id,
fe r a
t1.project_id,
/* Additional GroupBys Begin */
ans
t1.project_id, t1.period_id, t1.outlet_id
n - t r
/* Additional GroupBys End */
a no
) tt1
GROUP BY
h a s ฺ
tt1.ch_featurevalue_09_id,
ฺ a r) uide
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id, ฺ c om ent G
tt1.pg_featurevalue_01_elgr_id,
a on tud
tt1.countrychannel_elgr_id,
l l e@ is S
tt1.productgroup_id, i
ฺz se th
tt1.period_elgr_id
l o
/
a rce to u
l e (m ense
PROMPT @32 Results in 3140 Ticks

Zi l lic
SELECTlo
a rce'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
M 'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable JFV
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,
t8.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,

Oracle Database 11g: New Features for Administrators 369


t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
ble
/* Additional Columns Begin JFV */
fe r a
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
ans
/* Additional Columns End JFV */
n - t r
o
an
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6, s
ha deฺ
lu_elementgroup_rel t8, r )
ฺa Gui
lu_elementrange_rel t7, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t9,
lu_outlet_293 t2, @ ao Stud
lu_elementgroup_rel t3,
z i l le this
c e loฺ use
lu_elementgroup_rel t4
WHERE
a r to
m
/* Attribute Joins JFV */
e
i l e ( icens
((t1.outlet_id = t2.outlet_id
l
oZ l
/* Customizing Begin JFV */
e lAND t1.period_id = t2.period_id

Marc AND t1.project_id = t2.project_id)


/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters JFV */
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)

Oracle Database 11g: New Features for Administrators 370


AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
ble
GROUP BY
fe r a
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
ans
t7.elementrange_id,
n - t r
o
an
t8.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id, s
ha deฺ
t9.elementgroup_id, r )
ฺa Gui
t2.outlet_id, m
co ent
t1.project_id,
n ฺ
/* Additional GroupBys Begin */
@ ao Stud
t1.project_id, t1.period_id, t1.outlet_id
z i l
/* Additional GroupBys End */ le this
) tt1
c e loฺ use
GROUP BY
a r to
m
tt1.ch_featurevalue_09_id,
e
l e ( icens
tt1.ch_featurevalue_02_elgr_id,
i l
oZ l
tt1.pg_featurevalue_15_elrg_id,
e l
tt1.pg_featurevalue_01_elgr_id,

Marc tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/

PROMPT @Statement 45
rem #execute dbms_application_info.set_module('DWH_TEST','45');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg

Oracle Database 11g: New Features for Administrators 371


FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t6.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t7.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
ble
dnfactorsales,
fe r a
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ans
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
n - t r
o
an
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
s
ha deฺ
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag, r )
ฺa Gui
m
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
co ent

ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
n
/* Additional Columns Begin */ @ ao Stud
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,

z i l le this
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
c e loฺ use
r to
/* Additional Columns End */
a
FROM
m e
l e ( icens
lu_item_293 t5,
i l
oZ l
lu_elementgroup_rel t6,
e l fact_pd_out_itm_293 t1,

Marc lu_elementgroup_rel t7,


lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_01_id = t6.value_id)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)

Oracle Database 11g: New Features for Administrators 372


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_02_id = 4165)
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup


Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
ble
AND t1.project_type_id = '1'
fe r a
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ans
AND t1.project_type_id = '1'
n - t r
o
an
AND t1.project_type_id = '1'
)
GROUP BY s
ha deฺ
t2.ch_featurevalue_09_id, r )
ฺa Gui
t3.elementgroup_id, m
co ent
t5.pg_featurevalue_02_id,
n ฺ
t6.elementgroup_id,
t4.elementgroup_id, @ ao Stud
t5.productgroup_id,
z i l le this
t7.elementgroup_id,
c e loฺ use
t2.outlet_id,
a r to
m
t1.project_id,
e
l e ( icens
/* Additional GroupBys Begin */
i l
oZ l
t1.project_id, t1.period_id, t1.outlet_id
e l /* Additional GroupBys End */

Marc ) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @10 Results in 1188 Ticks

set timing off;


-- set module info to null
execute dbms_application_info.set_module(NULL, NULL);

PROMPT we are done


set autotrace off;
set echo on;
set termout on;
SELECT '@End', sysdate from dual;
spool off;

Oracle Database 11g: New Features for Administrators 373


FIN!

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/SPAbig/setup_SPAbig10g.sh:
#!/bin/ksh

export ORACLE_SID=db10g

export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1

export
PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
sr/X11R6/bin
ble
fe r a
rm /u01/app/oracle/product/10.2.0/dbhome_1/rdbms/log/apps.dmp
rm /u01/app/oracle/product/10.2.0/dbhome_1/rdbms/log/appsandstage.dmp
ans
n - t r
cp /home/oracle/solutions/SPAbig/apps.dmp
a no
/u01/app/oracle/product/10.2.0/dbhome_1/rdbms/log/apps.dmp
h a s ฺ
sqlplus / as sysdba <<FIN!
ฺ a r) uide
set echo on ฺ c om ent G
a on tud
startup;
l l e@ is S
i
ฺz se th
l o
exec dbms_sqltune.drop_sqlset('STS_JFV','SYSTEM');

a rce to u
l e (m ense
drop user apps cascade;

host impdp l
Zisystem/oracle
lic directory=DATA_PUMP_DIR dumpfile=apps.dmp
l o
rce distinct last_analyzed from dba_tab_statistics where owner='APPS';
aselect
M EXECUTE DBMS_STATS.LOCK_SCHEMA_STATS('APPS');
FIN!

----------------------------------------------------------

/home/oracle/solutions/SPAbig/stage_sts.sh:
#!/bin/ksh

export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1
export ORACLE_SID=db10g
export
PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/usr/java/jdk1.5.0_16/bin:/bin:
/usr/bin:/usr/local/bin:/usr/X11R6/bin

sqlplus system/oracle <<FIN!

set echo on

Oracle Database 11g: New Features for Administrators 374


select name,statement_count from dba_sqlset;

drop table apps.sts_jfv_tab purge;

exec DBMS_SQLTUNE.CREATE_STGTAB_SQLSET('STS_JFV_TAB','APPS');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

exec DBMS_SQLTUNE.PACK_STGTAB_SQLSET('STS_JFV','SYSTEM','STS_JFV_TAB','APPS');

FIN!

----------------------------------------------------------

/home/oracle/solutions/SPAbig/stop_orcl.sh:
#!/bin/ksh

ble
export ORACLE_SID=orcl
fe r a
export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
ans
n - t r
o
an
export

11R6/bin s
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
ha deฺ
r )
ฺa Gui
rm /u01/app/oracle/admin/orcl/dpdump/appsandstage.dmpm
co ent
n ฺ
emctl stop dbconsole
@ ao Stud
sqlplus / as sysdba <<FIN!
z i l le this
c e loฺ use
set echo on
a r to
m e
l e ( icens
connect system/oracle_4U
i l
l o Z l
ce
exec dbms_sqlpa.drop_analysis_task('SPA_JFV1');
a r
M exec dbms_sqlpa.drop_analysis_task('SPA_JFV2');
exec dbms_sqltune.drop_sqlset('STS_JFV','SYSTEM');

connect / as sysdba

drop user apps cascade;

shutdown immediate;

FIN!

----------------------------------------------------------

/home/oracle/solutions/SPAbig/unpack_sts.sh:
#!/bin/ksh

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1
export ORACLE_SID=orcl

Oracle Database 11g: New Features for Administrators 375


export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/usr/java/jdk1.5.0_16/bin:/bin:/usr
/bin:/usr/local/bin:/usr/X11R6/bin

sqlplus system/oracle_4U <<FIN!


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set echo on

exec
DBMS_SQLTUNE.UNPACK_STGTAB_SQLSET('STS_JFV','SYSTEM',TRUE,'STS_JFV_TAB','APPS');

alter system flush buffer_cache;


alter system flush shared_pool;

FIN!

ble
fe r a
----------------------------------------------------------
ans
/home/oracle/solutions/SPAbig/wrkl10g_jfv.sh:
n - t r
#!/bin/ksh
a no
export ORACLE_SID=db10g
h a s ฺ
ฺ a r) uide
ฺ c om ent G
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome_1

export
a on tud
l l e@ is S
PATH=/u01/app/oracle/product/10.2.0/dbhome_1/bin:/bin:/usr/bin:/usr/local/bin:/u
sr/X11R6/bin i
ฺz se th
l o
rce to u
sqlplus / as sysdba <<FIN!
a
-- as sysdba e
l (m the
flush
e n se pool
shared
l
Zi flushlicbuffer_cache;
ALTER system
ALTER lo
rce
system flush shared_pool;

M a
-- connect as dwh_test
CONNECT apps/apps;
set echo on;
spool /tmp/dwh_test.log;
-- Generated on Thu Sep 18 20:38:59 2003
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY:MON-DD:HH24:MI:SS';
SET LINES 80;
set wrap on
SET PAGES 0;
rem SET TRIMS ON;
SET HEADING OFF;
SELECT '@Start', sysdate from dual;
rem SET TERMOUT ON;
rem set ECHO OFF;
SET ECHO ON;
rem SET FEEDBACK OFF;
rem alter session set tracefile_identifier='noprof';
rem alter session set sql_trace=true;
alter system set cursor_sharing=exact;
set autotrace traceonly statistics;

Oracle Database 11g: New Features for Administrators 376


PROMPT @Statement 1
execute dbms_application_info.set_module('DWH_TEST','1');

SET TIMING ON;


SELECT DISTINCT
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id


FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_15_id = 1485)
ble
AND (t2.elementrange_id = 3091)
fe r a
/
)
ans
PROMPT @1 Results in 15 Ticks
n - t r
a no
h a s ฺ
PROMPT @Statement 2
ฺ a r) uide
ฺ c om ent G
rem #execute dbms_application_info.set_module('DWH_TEST','2');

SELECT DISTINCT
a on tud
'B' || t1.pg_featurevalue_15_id
l l e@ is S
pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15ot1,
i
ฺz se th
l
lu_elementrange_rel
a rcet2 to u
WHERE
/* Attribute e
l (m */ense
Joins
Zi l lic
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
e l o
)
a
/* cAttribute
rAND Filters */
M AND
((t1.pg_featurevalue_15_id = 12425)
(t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 0 Ticks

PROMPT @Statement 3
rem #execute dbms_application_info.set_module('DWH_TEST','3');

SELECT DISTINCT
'B' || t1.pg_featurevalue_15_id pg_featurevalue_15_id
FROM
lu_pg_featurevalue_15 t1,
lu_elementrange_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_15_num BETWEEN t2.lbound AND t2.ubound)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 377


AND ((t1.pg_featurevalue_15_id = 49620)
AND (t2.elementrange_id = 3091)
)
/
PROMPT @1 Results in 16 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 4
rem #execute dbms_application_info.set_module('DWH_TEST','4');

SELECT DISTINCT
'B' || t1.pg_featurevalue_47_id pg_featurevalue_47_id
FROM
lu_pg_featurevalue_47 t1,
lu_elementgroup_rel t2
ble
WHERE
fe r a
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
ans
)
n - t r
o
an
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 5454)
AND (t2.elementgroup_id = 6624) s
ha deฺ
) r )
ฺa Gui
/ m
co ent
PROMPT @1 Results in 0 Ticks
n ฺ
@ ao Stud
z i l le this
PROMPT @Statement 5
c e loฺ use
r to
rem #execute dbms_application_info.set_module('DWH_TEST','5');
a
m e
SELECT DISTINCT
i l l e ( icens
FROM lo
Z
'B' || l
t1.pg_featurevalue_47_id pg_featurevalue_47_id

a rcelu_pg_featurevalue_47 t1,
M lu_elementgroup_rel t2
WHERE
/* Attribute Joins */
((t1.pg_featurevalue_47_id = t2.value_id)
)
/* Attribute Filters */
AND ((t1.pg_featurevalue_47_id = 16003)
AND (t2.elementgroup_id = 6624)
)
/
PROMPT @1 Results in 15 Ticks

PROMPT @Statement 6
rem #execute dbms_application_info.set_module('DWH_TEST','6');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 378


'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
ble
((t1.item_id = t2.item_id
fe r a
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
ans
/* Customizing End */
n - t r
o
an
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
s
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
ha deฺ
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id) r )
ฺa Gui
) m
co ent
/* Attribute Filters */
n ฺ
AND ((t2.productgroup_id = 15520)
@ ao Stud
AND (t1.productgroup_id = 15520) /* Push Down Filters */
z
AND (t2.pg_featurevalue_01_id INi l le this
c e loฺ use
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
r
97,3891,71,76,89,92,95))
a to
m e
AND (t2.pg_featurevalue_08_id IN (716,717))
l e ( icens
AND (t2.pg_featurevalue_02_id IN (4165,4166))
i l
oZ l
AND (t2.pg_featurevalue_13_id = 5424)
e l
AND (t4.elementrange_id IN (3091,3092))

Marc AND (t5.elementrange_id IN (8693,8694,8695,8696,8697,8698,8699))


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @69 Results in 12078 Ticks

Oracle Database 11g: New Features for Administrators 379


PROMPT @Statement 7
rem #execute dbms_application_info.set_module('DWH_TEST','7');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
ble
lu_item_293 t2,
fe r a
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
ans
fact_pd_out_itm_293 t1,
n - t r
o
an
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE s
ha deฺ
/* Attribute Joins */ r )
ฺa Gui
((t1.item_id = t2.item_id m
co ent
/* Customizing Begin */
n ฺ
AND
ao Stud
t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ @
z i l le this
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)

c e loฺ use
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
r to
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
a
m e
AND (t1.period_id = t6.value_id)
)
i l l e ( icens
oZ l
/* Attribute Filters */
e l
AND ((t2.productgroup_id = 15520)

Marc AND (t1.productgroup_id = 15520) /* Push Down Filters */


AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8686,8687,8688,8689,8690,8691,8692,8693))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 380


t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @160 Results in 14344 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 8
rem #execute dbms_application_info.set_module('DWH_TEST','8');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,
ble
'B' || t2.productgroup_id productgroup_id,
fe r a
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ans
salesvalueeur
n - t r
o
an
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1, s
ha deฺ
lu_elementgroup_rel t4, r )
ฺa Gui
lu_elementrange_rel t3 m
co ent
WHERE
n ฺ
/* Attribute Joins */
((t1.item_id = t2.item_id @ ao Stud
/* Customizing Begin */
z i l le this
AND
loฺ use
t1.productgroup_id = t2.productgroup_id)
c e
/* Customizing End */
a r to
m e
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
l e ( icens
AND (t1.period_id = t4.value_id)
i l
oZ l
)
e l
/* Attribute Filters */

Marc AND ((t2.productgroup_id = 15520)


AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 381


t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @46 Results in 24281 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 9
rem #execute dbms_application_info.set_module('DWH_TEST','9');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
ble
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
fe r a
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
ans
'G' || t6.elementgroup_id period_id,
n - t r
o
an
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM s
ha deฺ
lu_item_293 t2, r )
ฺa Gui
lu_pg_featurevalue_15 t3, m
co ent
lu_elementrange_rel t4,
n ฺ
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6, @ ao Stud
lu_elementrange_rel t5
z i l le this
WHERE
c e loฺ use
/* Attribute Joins */
a r to
m e
((t1.item_id = t2.item_id
l e ( icens
/* Customizing Begin */
i l
oZ l
AND t1.productgroup_id = t2.productgroup_id)
e l
/* Customizing End */

Marc AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)


AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8680,8681,8682,8683,8684,8685,8686))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */

Oracle Database 11g: New Features for Administrators 382


AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @179 Results in 12500 Ticks

ble
PROMPT @Statement 10
fe r a
rem #execute dbms_application_info.set_module('DWH_TEST','10');
ans
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
n - t r
o
an
'G' || t3.elementgroup_id pg_featurevalue_18_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id, s
ha deฺ
'G' || t5.elementgroup_id period_id, r )
ฺa Gui
m
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
co ent
salesvalueeur
n ฺ
FROM
lu_item_293 t2, @ ao Stud
lu_elementgroup_rel t3,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t5,
a to
m
lu_elementrange_rel t4
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_18_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t3.elementgroup_id IN (8902,8903))
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */

Oracle Database 11g: New Features for Administrators 383


)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @40 Results in 1390 Ticks

PROMPT @Statement 11
rem #execute dbms_application_info.set_module('DWH_TEST','11');
ble
fe r a
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
ans
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
n - t r
o
an
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id, s
ha deฺ
'r' || t5.elementrange_id price_eur_id, r )
ฺa Gui
'B' || t2.productgroup_id productgroup_id, m
co ent
'G' || t6.elementgroup_id period_id,
n ฺ
salesvalueeur @ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM
z i l le this
lu_item_293 t2,
c e loฺ use
r
lu_pg_featurevalue_15 t3,
a to
m
lu_elementrange_rel t4,
e
l e ( icens
fact_pd_out_itm_293 t1,
i l
oZ l
lu_elementgroup_rel t6,
e l
lu_elementrange_rel t5

MarcWHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8671,8672,8673,8674,8675,8676,8679))

Oracle Database 11g: New Features for Administrators 384


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.project_type_id = '1'


)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @220 Results in 12297 Ticks
ans
n - t r
a no
PROMPT @Statement 12
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','12');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ c om ent G
a on tud
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id
l e@ is S
pg_featurevalue_01_id,
'r' || t5.elementrange_idilprice_eur_id,
l o e th
ฺz productgroup_id,
us
'B' || t2.productgroup_id
rce toperiod_id,
'G' || t6.elementgroup_id
a
salesvalueeure (m
l e n se
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM Zi l lic
l o
rcelu_pg_featurevalue_15
lu_item_293 t2,
a
M lu_elementrange_rel t4,
t3,

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))

Oracle Database 11g: New Features for Administrators 385


AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @281 Results in 39812 Ticks
ans
n - t r
a no
PROMPT @Statement 13
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','13');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/ c om ent G
a on tud
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id
l e@ is S
pg_featurevalue_01_id,
'r' || t5.elementrange_idilprice_eur_id,
l o e th
ฺz productgroup_id,
us
'B' || t2.productgroup_id
rce toperiod_id,
'G' || t6.elementgroup_id
a
salesvalueeure (m
l e n se
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM Zi l lic
l o
rcelu_pg_featurevalue_15
lu_item_293 t2,
a
M lu_elementrange_rel t4,
t3,

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))

Oracle Database 11g: New Features for Administrators 386


AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t4.elementrange_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
ble
t6.elementgroup_id
fe r a
/
PROMPT @319 Results in 40938 Ticks
ans
n - t r
a no
PROMPT @Statement 14
h a s ฺ
a r) uide
rem #execute dbms_application_info.set_module('DWH_TEST','14');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) ฺ*/c om ent G
a on tud
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,

l e@ is S
'r' || t4.elementrange_id pg_featurevalue_15_id,
'G' || t5.elementgroup_idilpg_featurevalue_01_id,
l o e th
ฺz price_eur_id,
us
'r' || t6.elementrange_id
rce toproductgroup_id,
'B' || t2.productgroup_id
a
l e (m ense
'G' || t7.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
Zi l
salesvalueeur lic
FROM lo
a rcelu_item_293 t2,
M lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_elementrange_rel t6
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t2.pg_featurevalue_01_id = t5.value_id)
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Oracle Database 11g: New Features for Administrators 387


AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t4.elementrange_id = 3091)
AND (t5.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
ble
t2.pg_featurevalue_05_id,
fe r a
t4.elementrange_id,
t5.elementgroup_id,
ans
t6.elementrange_id,
n - t r
t2.productgroup_id,
a no
/
t7.elementgroup_id
h a s ฺ
PROMPT @135 Results in 49031 Ticks
ฺ a r) uide
ฺ c om ent G
a on tud
PROMPT @Statement 15
l l e@ is S
i
ฺz se th
rem #execute dbms_application_info.set_module('DWH_TEST','15');
l o
rce tUSE_HASH(t1)
SELECT /* ORDERED INDEX(t1)
a o u */

l e (m ense
'r' || t4.elementrange_id
'B' || t2.pg_featurevalue_01_id
pg_featurevalue_15_id,
pg_featurevalue_01_id,
'r' ||Z i l li c
t5.elementrange_id price_eur_id,
e l
'B' o || t2.productgroup_id productgroup_id,
arc 'G' || t6.elementgroup_id period_id,
M salesvalueeur
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)

FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */

Oracle Database 11g: New Features for Administrators 388


AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t5.elementrange_id IN (8656,8657))


AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
ble
t4.elementrange_id,
fe r a
t2.pg_featurevalue_01_id,
t5.elementrange_id,
ans
t2.productgroup_id,
n - t r
t6.elementgroup_id
a no
/
PROMPT @5 Results in 9625 Ticks
h a s ฺ
ฺ a r) uide
ฺ c om ent G
PROMPT @Statement 16
a on tud
l l e@ is S
rem #execute dbms_application_info.set_module('DWH_TEST','16');
i
ฺzUSE_HASH(t1) th */
SELECT /* ORDERED INDEX(t1)
l o s e
rce to u pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_13_id
a
( m s e
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,

'B' ||Z le licen


'r' || t4.elementrange_id pg_featurevalue_15_id,
ilt2.pg_featurevalue_08_id pg_featurevalue_08_id,
e l
'B' o || t2.pg_featurevalue_01_id pg_featurevalue_01_id,

Marc 'r' || t5.elementrange_id price_eur_id,


'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)

Oracle Database 11g: New Features for Administrators 389


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
AND (t5.elementrange_id IN (8664,8665,8666,8667,8668,8669,8670,8671))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ble
)
fe r a
/* Fact Filters */
AND (t1.project_type_id = '1'
ans
)
n - t r
GROUP BY
a no
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
h a s ฺ
t4.elementrange_id,
ฺ a r) uide
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id, ฺ c om ent G
t5.elementrange_id,
a on tud
t2.productgroup_id,
l l e@ is S
t6.elementgroup_id i
ฺz se th
/
l o
rce to u
PROMPT @140 Results in 14219 Ticks
a
l e (m ense
Zi l lic
PROMPTlo@Statement 17
a rce#execute dbms_application_info.set_module('DWH_TEST','17');
rem
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)

Oracle Database 11g: New Features for Administrators 390


/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t6.elementgroup_id = 14659)
ble
AND (t1.period_id IN
fe r a
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
ans
)
n - t r
/* Fact Filters */
a no
AND (t1.project_type_id = '1'
)
h a s ฺ
GROUP BY
ฺ a r) uide
t4.elementrange_id,
t2.pg_featurevalue_01_id, ฺ c om ent G
t5.elementrange_id,
a on tud
t2.productgroup_id,
l l e@ is S
t6.elementgroup_id i
ฺz se th
/
l o
rce to u
PROMPT @353 Results in 41250 Ticks
a
l e (m ense
Zi l lic
PROMPTlo@Statement 18
a rce#execute dbms_application_info.set_module('DWH_TEST','18');
rem
M SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */

Oracle Database 11g: New Features for Administrators 391


((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)


AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
ble
AND (t2.pg_featurevalue_02_id IN (4165,4166))
fe r a
AND (t2.pg_featurevalue_13_id = 5424)
AND (t4.elementrange_id IN (3091,3092))
ans
AND (t5.elementrange_id IN (8658,8659,8660,8661,8662,8663,8664))
n - t r
o
an
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
s
ha deฺ
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */ r )
ฺa Gui
) m
co ent
/* Fact Filters */
n ฺ
AND (t1.project_type_id = '1'
) @ ao Stud
GROUP BY
z i l le this
t2.pg_featurevalue_13_id,
c e loฺ use
r
t2.pg_featurevalue_02_id,
a to
m
t4.elementrange_id,
e
l e ( icens
t2.pg_featurevalue_08_id,
i l
oZ l
t2.pg_featurevalue_01_id,
e l
t5.elementrange_id,

Marc t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @3 Results in 12578 Ticks

PROMPT @Statement 19
rem #execute dbms_application_info.set_module('DWH_TEST','19');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,

Oracle Database 11g: New Features for Administrators 392


fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ble
AND (t1.productgroup_id = 15520) /* Push Down Filters */
fe r a
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ans
97,3891,71,76,89,92,95))
n - t r
o
an
AND (t4.elementrange_id IN (3091,3092,3093,3107))
AND (t5.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667)) s
ha deฺ
AND (t6.elementgroup_id = 14659) r )
ฺa Gui
AND (t1.period_id IN m
co ent

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
n
ElementGroup Filters */
) @ ao Stud
/* Fact Filters */
z i l le this
c e loฺ use
AND (t1.project_type_id = '1'
)
a r to
GROUP BY
m e
l e ( icens
t4.elementrange_id,
i l
oZ l
t2.pg_featurevalue_01_id,
e l
t5.elementrange_id,

Marc t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @118 Results in 41453 Ticks

PROMPT @Statement 20
rem #execute dbms_application_info.set_module('DWH_TEST','20');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM

Oracle Database 11g: New Features for Administrators 393


lu_item_293 t2,
lu_pg_featurevalue_15 t3,
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t6,
lu_elementrange_rel t5
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
AND (t1.period_id = t6.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.pg_featurevalue_01_id IN

97,3891,71,76,89,92,95)) s
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
ha deฺ
AND (t2.pg_featurevalue_08_id IN (716,717)) r )
ฺa Gui
AND (t2.pg_featurevalue_02_id IN (4165,4166)) m
co ent
AND (t2.pg_featurevalue_13_id = 5424)
n ฺ
AND (t4.elementrange_id IN (3091,3092))
@
AND (t5.elementrange_id IN (8656,8657)) ao Stud
z
AND (t6.elementgroup_id = 14659)i l le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
)
i l l e ( icens
oZ l
/* Fact Filters */
e l
AND (t1.project_type_id = '1'

Marc )
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_02_id,
t4.elementrange_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
PROMPT @0 Results in 4594 Ticks

PROMPT @Statement 21
rem #execute dbms_application_info.set_module('DWH_TEST','21');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,

Oracle Database 11g: New Features for Administrators 394


'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
ble
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
fe r a
AND (t1.period_id = t4.value_id)
)
ans
/* Attribute Filters */
n - t r
o
an
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717)) s
ha deฺ
AND (t2.pg_featurevalue_15_id IN (12425,1485)) r )
ฺa Gui
AND (t2.pg_featurevalue_02_id IN (4165,4166)) m
co ent
AND (t3.elementrange_id IN
n ฺ
@ ao Stud
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
z i l le this
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))

c e loฺ use
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
a r to
m e
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
l e ( icens
ElementGroup Filters */
i l
oZ l
)
e l
/* Fact Filters */

Marc AND (t1.project_type_id = '1'


)
GROUP BY
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @171 Results in 68984 Ticks

PROMPT @Statement 22
rem #execute dbms_application_info.set_module('DWH_TEST','22');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t3.elementrange_id price_eur_id,

Oracle Database 11g: New Features for Administrators 395


'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
lu_item_293 t2,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
ble
AND (t1.period_id = t4.value_id)
fe r a
)
/* Attribute Filters */
ans
AND ((t2.productgroup_id = 15520)
n - t r
o
an
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_15_id IN (12425,1485)) s
ha deฺ
AND (t2.pg_featurevalue_02_id IN (4165,4166)) r )
ฺa Gui
AND NOT ((/* ElementGroup Subselect */ m
co ent
(
n ฺ
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id @ ao Stud
FROM
z i l le this
lu_elementgroup_rel g1
WHERE
c e loฺ use
r to
/* ElementGroup Filters */
a
m e
(g1.elementgroup_id IN (1959,1960,1961,1962))

i l l)e ( icens
oZ l
)
e l )

Marc )
AND (t3.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @149 Results in 70531 Ticks

Oracle Database 11g: New Features for Administrators 396


PROMPT @Statement 23
rem #execute dbms_application_info.set_module('DWH_TEST','23');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur
FROM
ble
lu_item_293 t2,
fe r a
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
ans
lu_elementrange_rel t3
n - t r
o
an
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id s
ha deฺ
/* Customizing Begin */ r )
ฺa Gui
AND t1.productgroup_id = t2.productgroup_id) m
co ent
/* Customizing End */
n ฺ
AND (t1.period_id = t4.value_id) @ ao Stud
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

)
z i l le this
/* Attribute Filters */
c e loฺ use
r to
AND ((t2.productgroup_id = 15520)
a
m e
AND (t1.productgroup_id = 15520) /* Push Down Filters */
l e ( icens
AND (t2.pg_featurevalue_01_id IN
i l
oZ l
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
e l
97,3891,71,76,89,92,95))

Marc AND (t2.pg_featurevalue_08_id IN (716,717))


AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @1 Results in 4531 Ticks

Oracle Database 11g: New Features for Administrators 397


PROMPT @Statement 24
rem #execute dbms_application_info.set_module('DWH_TEST','24');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,


'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
ble
lu_elementrange_rel t3
fe r a
WHERE
/* Attribute Joins */
ans
((t1.item_id = t2.item_id
n - t r
o
an
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */ s
ha deฺ
r )
ฺa Gui
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id) m
co ent
)
n ฺ
/* Attribute Filters */
AND ((t2.productgroup_id = 15520) @ ao Stud
z i l le this
AND (t1.productgroup_id = 15520) /* Push Down Filters */

c e loฺ use
AND NOT ((t2.pg_featurevalue_01_id IN
r to
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
a
m
97,3891,71,76,89,92,95)))
e
l e ( icens
AND (t2.pg_featurevalue_15_id = 1484)
i l
oZ l
AND (t2.pg_featurevalue_02_id IN (4165,4166))
e l
AND (t2.pg_featurevalue_05_id = 5447)

Marc AND (t3.elementrange_id IN


(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,
t2.pg_featurevalue_15_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @16 Results in 532 Ticks

Oracle Database 11g: New Features for Administrators 398


PROMPT @Statement 25
rem #execute dbms_application_info.set_module('DWH_TEST','25');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,


'B' || t2.pg_featurevalue_02_id pg_featurevalue_02_id,
'r' || t4.elementrange_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
'r' || t5.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t6.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
ble
lu_pg_featurevalue_15 t3,
fe r a
lu_elementrange_rel t4,
fact_pd_out_itm_293 t1,
ans
lu_elementgroup_rel t6,
n - t r
o
an
lu_elementrange_rel t5
WHERE
/* Attribute Joins */ s
ha deฺ
((t1.item_id = t2.item_id r )
ฺa Gui
/* Customizing Begin */ m
co ent
AND ฺ
t1.productgroup_id = t2.productgroup_id)
n
/* Customizing End */
@ ao Stud
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
z i l le this
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)

c e loฺ use
AND (t1.pd_price_units_eur BETWEEN t5.lbound AND t5.ubound)
r to
AND (t1.period_id = t6.value_id)
a
)
m e
l e ( icens
/* Attribute Filters */
i l
oZ l
AND ((t2.productgroup_id = 15520)
e l
AND (t1.productgroup_id = 15520) /* Push Down Filters */

Marc AND NOT ((t2.pg_featurevalue_01_id IN


(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95)))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_02_id IN (4165,4166))
AND (t2.pg_featurevalue_05_id = 5447)
AND (t4.elementrange_id = 3091)
AND (t5.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t6.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_02_id,

Oracle Database 11g: New Features for Administrators 399


t4.elementrange_id,
t2.pg_featurevalue_08_id,
t5.elementrange_id,
t2.productgroup_id,
t6.elementgroup_id
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @77 Results in 8219 Ticks

PROMPT @Statement 26
rem #execute dbms_application_info.set_module('DWH_TEST','26');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
ble
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
fe r a
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
ans
'B' || t2.productgroup_id productgroup_id,
n - t r
o
an
'G' || t5.elementgroup_id period_id,

FROM s
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
ha deฺ
lu_item_293 t2, r )
ฺa Gui
lu_elementgroup_rel t3, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t5,
lu_elementrange_rel t4 @ ao Stud
WHERE
z i l le this
/* Attribute Joins */
c e loฺ use
r
((t1.item_id = t2.item_id
a to
m
/* Customizing Begin */
e
AND
l e ( icens
t1.productgroup_id = t2.productgroup_id)
i l
oZ l
/* Customizing End */
e l
AND (t2.pg_featurevalue_13_id = t3.value_id)

Marc AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)


AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN
(8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 400


GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @20 Results in 15000 Ticks

PROMPT @Statement 27
rem #execute dbms_application_info.set_module('DWH_TEST','27');

ble
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
fe r a
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
ans
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
n - t r
o
an
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id, s
ha deฺ
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
salesvalueeur m
co ent
FROM
n ฺ
lu_item_293 t2,
fact_pd_out_itm_293 t1, @ ao Stud
lu_elementgroup_rel t4,
z i l le this
lu_elementrange_rel t3
c e loฺ use
WHERE
a r to
m
/* Attribute Joins */
e
l e ( icens
((t1.item_id = t2.item_id
i l
oZ l
/* Customizing Begin */
eANDl t1.productgroup_id = t2.productgroup_id)

Marc/* Customizing End */


AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695
,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'

Oracle Database 11g: New Features for Administrators 401


)
GROUP BY
t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @313 Results in 42485 Ticks

PROMPT @Statement 28
rem #execute dbms_application_info.set_module('DWH_TEST','28');

ble
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
fe r a
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
ans
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
n - t r
o
an
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id, s
ha deฺ
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM m
co ent
lu_item_293 t2,
n ฺ
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4, @ ao Stud
lu_elementrange_rel t3
z i l le this
WHERE
c e loฺ use
/* Attribute Joins */
a r to
m e
((t1.item_id = t2.item_id
l e ( icens
/* Customizing Begin */
i l
oZ l
AND t1.productgroup_id = t2.productgroup_id)
e l
/* Customizing End */

Marc AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)


AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
(8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY

Oracle Database 11g: New Features for Administrators 402


t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
PROMPT @11 Results in 12641 Ticks

PROMPT @Statement 29
rem #execute dbms_application_info.set_module('DWH_TEST','29');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
ble
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
fe r a
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
ans
'B' || t2.productgroup_id productgroup_id,
n - t r
o
an
'G' || t4.elementgroup_id period_id,

salesvalueeur s
SUM(t1.pd_sales_units*t1.pd_projection_factor*t1.pd_price_units_eur)
ha deฺ
FROM r )
ฺa Gui
lu_item_293 t2, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t4,
lu_elementrange_rel t3 @ ao Stud
WHERE
z i l le this
/* Attribute Joins */
c e loฺ use
r
((t1.item_id = t2.item_id
a to
m
/* Customizing Begin */
e
AND
l e ( icens
t1.productgroup_id = t2.productgroup_id)
i l
oZ l
/* Customizing End */
e l
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

Marc AND (t1.period_id = t4.value_id)


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id IN (716,717))
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673
,8674,8675,8676,8679))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY

Oracle Database 11g: New Features for Administrators 403


t2.pg_featurevalue_13_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
PROMPT @318 Results in 42875 Ticks

PROMPT @Statement 30
rem #execute dbms_application_info.set_module('DWH_TEST','30');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
ble
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
fe r a
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t3.elementrange_id price_eur_id,
ans
'B' || t2.productgroup_id productgroup_id,
n - t r
o
an
'G' || t4.elementgroup_id period_id,

FROM s
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
ha deฺ
lu_item_293 t2, r )
ฺa Gui
fact_pd_out_itm_293 t1, m
co ent
lu_elementgroup_rel t4,
n ฺ
lu_elementrange_rel t3
WHERE @ ao Stud
/* Attribute Joins */
z i l le this
c e loฺ use
((t1.item_id = t2.item_id
/* Customizing Begin */
a r to
AND
m e
t1.productgroup_id = t2.productgroup_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
e l
AND (t1.period_id = t4.value_id)

Marc )
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
(8671,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,

Oracle Database 11g: New Features for Administrators 404


t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @72 Results in 11703 Ticks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @Statement 31
rem #execute dbms_application_info.set_module('DWH_TEST','31');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
ble
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
fe r a
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
ans
'G' || t5.elementgroup_id period_id,
n - t r
o
an
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2, s
ha deฺ
lu_elementgroup_rel t3, r )
ฺa Gui
fact_pd_out_itm_293 t1, m
co ent
lu_elementgroup_rel t5,
n ฺ
lu_elementrange_rel t4
WHERE @ ao Stud
/* Attribute Joins */
z i l le this
c e loฺ use
((t1.item_id = t2.item_id
/* Customizing Begin */
a r to
AND
m e
t1.productgroup_id = t2.productgroup_id)
l e ( icens
/* Customizing End */
i l
oZ l
AND (t2.pg_featurevalue_13_id = t3.value_id)
e l
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)

Marc AND (t1.period_id = t5.value_id)


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN
(8680,8681,8682,8683,8684,8685,8686,8687,8688,8689))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY

Oracle Database 11g: New Features for Administrators 405


t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t5.elementgroup_id
/
PROMPT @103 Results in 14610 Ticks

PROMPT @Statement 32
rem #execute dbms_application_info.set_module('DWH_TEST','32');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


ble
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
fe r a
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
ans
'r' || t3.elementrange_id price_eur_id,
n - t r
o
an
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
s
ha deฺ
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM r )
ฺa Gui
lu_item_293 t2, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t4,
lu_elementrange_rel t3 @ ao Stud
WHERE
z i l le this
/* Attribute Joins */
c e loฺ use
r
((t1.item_id = t2.item_id
a to
m
/* Customizing Begin */
e
AND
l e ( icens
t1.productgroup_id = t2.productgroup_id)
i l
oZ l
/* Customizing End */
e l
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)

Marc AND (t1.period_id = t4.value_id)


)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t2.pg_featurevalue_05_id,

Oracle Database 11g: New Features for Administrators 406


t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

PROMPT @299 Results in 11828 Ticks

PROMPT @Statement 33
rem #execute dbms_application_info.set_module('DWH_TEST','33');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
ble
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
fe r a
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
ans
'B' || t2.productgroup_id productgroup_id,
n - t r
o
an
'G' || t5.elementgroup_id period_id,

FROM s
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
ha deฺ
lu_item_293 t2, r )
ฺa Gui
lu_elementgroup_rel t3, m
co ent
fact_pd_out_itm_293 t1,
n ฺ
lu_elementgroup_rel t5,
lu_elementrange_rel t4 @ ao Stud
WHERE
z i l le this
/* Attribute Joins */
c e loฺ use
r
((t1.item_id = t2.item_id
a to
m
/* Customizing Begin */
e
AND
l e ( icens
t1.productgroup_id = t2.productgroup_id)
i l
oZ l
/* Customizing End */
e l
AND (t2.pg_featurevalue_13_id = t3.value_id)

Marc AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)


AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN
(8668,8669,8670,8671,8672,8673,8674,8675,8676,8679))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
)

Oracle Database 11g: New Features for Administrators 407


GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @222 Results in 14875 Ticks

PROMPT @Statement 34
rem #execute dbms_application_info.set_module('DWH_TEST','34');

ble
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
fe r a
'G' || t3.elementgroup_id pg_featurevalue_13_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
ans
'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
n - t r
o
an
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id, s
ha deฺ
'G' || t5.elementgroup_id period_id, r )
ฺa Gui
m
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
co ent
FROM
n ฺ
lu_item_293 t2,
lu_elementgroup_rel t3, @ ao Stud
fact_pd_out_itm_293 t1,
z i l le this
lu_elementgroup_rel t5,
c e loฺ use
r
lu_elementrange_rel t4
a to
WHERE
m e
l e ( icens
/* Attribute Joins */
i l
oZ l
((t1.item_id = t2.item_id
e l
/* Customizing Begin */

Marc AND t1.productgroup_id = t2.productgroup_id)


/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN
(8658,8659,8660,8661,8662,8663,8664,8665,8666,8667))
AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)

Oracle Database 11g: New Features for Administrators 408


/* Fact Filters */
AND (t1.project_type_id = '1'
)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @127 Results in 15234 Ticks

ble
PROMPT @Statement 35
fe r a
rem #execute dbms_application_info.set_module('DWH_TEST','35');
ans
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
n - t r
o
an
'B' || t2.pg_featurevalue_05_id pg_featurevalue_05_id,
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id, s
ha deฺ
'r' || t3.elementrange_id price_eur_id, r )
ฺa Gui
'B' || t2.productgroup_id productgroup_id, m
co ent
'G' || t4.elementgroup_id period_id,
n ฺ
FROM @ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

lu_item_293 t2,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t4,
a to
m
lu_elementrange_rel t3
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_15_id IN (1481,1484))
AND (t2.pg_featurevalue_05_id IN (5446,5447))
AND (t3.elementrange_id IN (8656,8657))
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'

Oracle Database 11g: New Features for Administrators 409


)
GROUP BY
t2.pg_featurevalue_05_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_01_id,
t3.elementrange_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @11 Results in 2281 Ticks

PROMPT @Statement 36
rem #execute dbms_application_info.set_module('DWH_TEST','36');

ble
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
fe r a
'G' || t5.elementgroup_id pg_featurevalue_31_id,
'B' || t2.pg_featurevalue_09_id pg_featurevalue_09_id,
ans
'r' || t4.elementrange_id pg_featurevalue_15_id,
n - t r
o
an
'r' || t6.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t7.elementgroup_id period_id, s
ha deฺ
r )
ฺa Gui
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM m
co ent
lu_item_293 t2,
n ฺ
lu_pg_featurevalue_15 t3,
lu_elementgroup_rel t5, @ ao Stud
lu_elementrange_rel t4,
z i l le this
fact_pd_out_itm_293 t1,
c e loฺ use
r
lu_elementgroup_rel t7,
a to
m
lu_elementrange_rel t6
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l((t1.item_id = t2.item_id

Marc/* Customizing Begin */


AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_15_id = t3.pg_featurevalue_15_id)
AND (t3.pg_featurevalue_15_num BETWEEN t4.lbound AND t4.ubound)
AND (t2.pg_featurevalue_31_id = t5.value_id)
AND (t1.pd_price_units_eur BETWEEN t6.lbound AND t6.ubound)
AND (t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_09_id IN (5484,5485))
AND (t5.elementgroup_id = 8597)
AND (t4.elementrange_id = 3106)
AND (t6.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t7.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 410


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t5.elementgroup_id,
t2.pg_featurevalue_09_id,
t4.elementrange_id,
t6.elementrange_id,
t2.productgroup_id,
t7.elementgroup_id
/
PROMPT @13 Results in 562 Ticks
ble
fe r a
ans
PROMPT @Statement 37
n - t r
o
an
rem #execute dbms_application_info.set_module('DWH_TEST','37');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */ s


ha deฺ
r )
ฺa Gui
'G' || t3.elementgroup_id pg_featurevalue_13_id,
m
'B' || t2.pg_featurevalue_15_id pg_featurevalue_15_id,
co ent

'B' || t2.pg_featurevalue_08_id pg_featurevalue_08_id,
n
@ ao Stud
'B' || t2.pg_featurevalue_01_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
le this
'B' || t2.productgroup_idilproductgroup_id,
z
'G' || t5.elementgroup_id
c e loฺ period_id,
u se
a r t o
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
l
lu_item_293 e (m
t2,
e n se
Zi l lic t3,
lu_elementgroup_rel
l o
elu_elementgroup_rel t1,
fact_pd_out_itm_293
r c
Ma lu_elementrange_rel t4
t5,

WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_13_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_01_id IN
(103,104,107,110,113,134,148,167,171,186,192,216,2259,236,241,2477,24958,27445,2
97,3891,71,76,89,92,95))
AND (t2.pg_featurevalue_08_id = 717)
AND (t2.pg_featurevalue_15_id IN (12425,1485))
AND (t3.elementgroup_id IN (1952,1953))
AND (t4.elementrange_id IN (8656,8657))

Oracle Database 11g: New Features for Administrators 411


AND (t5.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t1.project_type_id = '1'


)
GROUP BY
t3.elementgroup_id,
t2.pg_featurevalue_15_id,
t2.pg_featurevalue_08_id,
t2.pg_featurevalue_01_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
ble
/
fe r a
PROMPT @1 Results in 3469 Ticks
ans
n - t r
o
PROMPT @Statement 38
s an
r ) ha deฺ
rem #execute dbms_application_info.set_module('DWH_TEST','38');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */ mฺa


G ui
ฺ co ent
'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
n
@ ao Stud
'G' || t3.elementgroup_id pg_featurevalue_01_id,
'r' || t4.elementrange_id price_eur_id,
le this
'B' || t2.productgroup_idilproductgroup_id,
z
'G' || t5.elementgroup_id
c e loฺ period_id,
u se
a r t o
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
l
lu_item_293 e (m
t2,
e n se
Zi l lic t3,
lu_elementgroup_rel
l o
elu_elementgroup_rel t1,
fact_pd_out_itm_293
a r c t5,
M WHERElu_elementrange_rel t4
/* Attribute Joins */
((t1.item_id = t2.item_id
/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_01_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND (t3.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementrange_id IN
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659)

Oracle Database 11g: New Features for Administrators 412


AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

)
GROUP BY
t2.pg_featurevalue_13_id,
t3.elementgroup_id,
t4.elementrange_id,
t2.productgroup_id,
t5.elementgroup_id
/
PROMPT @172 Results in 76250 Ticks

ble
fe r a
PROMPT @Statement 39
ans
rem #execute dbms_application_info.set_module('DWH_TEST','39');
n - t r
o
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */
s an
'G' || t3.elementgroup_id pg_featurevalue_47_id,
r ) ha deฺ
'r' || t4.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id, m ฺa Gui
'G' || t5.elementgroup_id period_id,
n ฺ co ent
FROM @ ao Stud
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits

lu_item_293 t2,
z i l le this
lu_elementgroup_rel t3,
c e loฺ use
r
fact_pd_out_itm_293 t1,
a to
m
lu_elementgroup_rel t5,
e
l e ( icens
lu_elementrange_rel t4
i l
oZ l
WHERE
e l
/* Attribute Joins */

Marc ((t1.item_id = t2.item_id


/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t2.pg_featurevalue_47_id = t3.value_id)
AND (t1.pd_price_units_eur BETWEEN t4.lbound AND t4.ubound)
AND (t1.period_id = t5.value_id)
)
/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND NOT ((t2.pg_featurevalue_15_id IN (1474,1481,1483,1484)
OR
/* ElementGroup Subselect */
(
t2.pg_featurevalue_15_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
/* ElementGroup Filters */
(g1.elementgroup_id = 8507)
)

Oracle Database 11g: New Features for Administrators 413


)
OR
/* ElementRange Subselect */
t2.pg_featurevalue_15_id IN
(SELECT r1.pg_featurevalue_15_id
FROM lu_pg_featurevalue_15 r1,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

lu_elementrange_rel r2
WHERE
/* Feature Filter */
(r1.pg_feature_15_id = 977)
/* Attribute Join */
AND (r1.pg_featurevalue_15_num BETWEEN r2.lbound AND r2.ubound)
/* ElementRange Filter */
AND (r2.elementrange_id = 5783)
)
)
ble
)
fe r a
AND (t3.elementgroup_id = 6624)
AND (t4.elementrange_id IN
ans
n
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671 - t r
o
an
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
AND (t5.elementgroup_id = 14659) s
ha deฺ
AND (t1.period_id IN r )
ฺa Gui
m
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
co ent
ElementGroup Filters */
n ฺ
)
/* Fact Filters */ @ ao Stud
AND (t1.project_type_id = '1'
z i l le this
)
c e loฺ use
GROUP BY
a r to
m
t3.elementgroup_id,
e
l e ( icens
t4.elementrange_id,
i l
oZ l
t2.productgroup_id,
e l
t5.elementgroup_id

Marc/
PROMPT @8 Results in 2781 Ticks

PROMPT @Statement 40
rem #execute dbms_application_info.set_module('DWH_TEST','40');

SELECT /* ORDERED INDEX(t1) USE_HASH(t1) */


'B' || t2.pg_featurevalue_13_id pg_featurevalue_13_id,
'r' || t3.elementrange_id price_eur_id,
'B' || t2.productgroup_id productgroup_id,
'G' || t4.elementgroup_id period_id,
SUM(t1.pd_sales_units*t1.pd_projection_factor) salesunits
FROM
lu_item_293 t2,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t4,
lu_elementrange_rel t3
WHERE
/* Attribute Joins */
((t1.item_id = t2.item_id

Oracle Database 11g: New Features for Administrators 414


/* Customizing Begin */
AND t1.productgroup_id = t2.productgroup_id)
/* Customizing End */
AND (t1.pd_price_units_eur BETWEEN t3.lbound AND t3.ubound)
AND (t1.period_id = t4.value_id)
)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Attribute Filters */
AND ((t2.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.pg_featurevalue_13_id = 5424)
AND NOT ((/* ElementGroup Subselect */
(
t2.pg_featurevalue_01_id IN
(SELECT g1.value_id
FROM lu_elementgroup_rel g1
WHERE
ble
/* ElementGroup Filters */
fe r a
)
(g1.elementgroup_id IN (1959,1960,1961,1962))
ans
)
n - t r
o
an
)
)
AND (t3.elementrange_id IN s
ha deฺ
r )
ฺa Gui
(8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671
m
,8672,8673,8674,8675,8676,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689
co ent

,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699))
n
AND (t4.elementgroup_id = 14659)
AND (t1.period_id IN @ ao Stud
z i l le this
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
c e loฺ use
)
a r to
/* Fact Filters */
m e
l e ( icens
AND (t1.project_type_id = '1'
i l
oZ l
)
e l
GROUP BY

Marc t2.pg_featurevalue_13_id,
t3.elementrange_id,
t2.productgroup_id,
t4.elementgroup_id
/
PROMPT @40 Results in 92391 Ticks

PROMPT @Statement 45
rem #execute dbms_application_info.set_module('DWH_TEST','45');

SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'B' || tt1.pg_featurevalue_02_id pg_featurevalue_02_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,

Oracle Database 11g: New Features for Administrators 415


SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t5.pg_featurevalue_02_id pg_featurevalue_02_id,
t6.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
ble
t7.elementgroup_id period_elgr_id,
fe r a
t2.outlet_id outlet_id,
t1.project_id project_id,
ans
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
n - t r
o
an
dnfactorsales,
s
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
ha deฺ
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
r )
ฺa Gui
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
m
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
co ent

MAX(t1.pd_distribution_factor) distributionfactor,
n
dissalesflag, @ ao Stud
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))

z i l le this
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +

c e loฺ use
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
r to
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
a
m e
/* Additional Columns Begin */
l e ( icens
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
i l
oZ l
outlet_id_d
e l /* Additional Columns End */

Marc FROM
lu_item_293 t5,
lu_elementgroup_rel t6,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t7,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE
/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_01_id = t6.value_id)

Oracle Database 11g: New Features for Administrators 416


AND
(t1.period_id = t7.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t5.pg_featurevalue_02_id = 4165)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.ch_featurevalue_09_id = 7379)


AND (t3.elementgroup_id IN (3481,3482))
AND (t6.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t7.elementgroup_id = 14659)
AND (t1.period_id IN
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ble
ElementGroup Filters */
fe r a
)
/* Fact Filters */
ans
AND (t1.project_type_id = '1'
n - t r
o
an
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1' s
ha deฺ
AND t1.project_type_id = '1' r )
ฺa Gui
AND t1.project_type_id = '1' m
co ent
)
n ฺ
GROUP BY
t2.ch_featurevalue_09_id, @ ao Stud
t3.elementgroup_id,
z i l le this
c e loฺ use
t5.pg_featurevalue_02_id,
r
t6.elementgroup_id,
a to
m
t4.elementgroup_id,
e
l e ( icens
t5.productgroup_id,
i l
oZ l
t7.elementgroup_id,
e l t2.outlet_id,

Marc t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,
tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_02_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/
PROMPT @10 Results in 1188 Ticks

set timing off;


-- set module info to null
execute dbms_application_info.set_module(NULL, NULL);

PROMPT we are done


set autotrace off;

Oracle Database 11g: New Features for Administrators 417


set echo on;
set termout on;
SELECT '@End', sysdate from dual;
spool off;

FIN!
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/SPM/accept_evolve_baseline.sql:
set echo on

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge
from dba_sql_plan_baselines
ble
where sql_text like 'select /*+ USE_NL(s c) FULL(s) FULL(c) */%';
fe r a
exec dbms_sqltune.accept_sql_profile(task_name => :spmtune, name =>
ans
'SPM_SQL_PROF');
n - t r
a no
'SPM%';
h a s ฺ
select signature, category, name, sql_text from dba_sql_profiles where name like

a r)origin, e
idenabled,
select signature, sql_handle, sql_text, plan_name, ฺ
m nt G u accepted,
c o
fixed, autopurge
from dba_sql_plan_baselines
a o nฺ ude
@
where sql_text like 'select /*+ USE_NL(s S
c) t
FULL(s) FULL(c) */%';
l l e i s
l o ฺzi se th
rce to u
----------------------------------------------------------
a
l e (m ense
/home/oracle/solutions/SPM/catchup_sts.sql:
oni
set echo Z l lic
l o
a r cesys.dbms_sqltune.create_sqlset(sqlset_name => 'SPM_STS', sqlset_owner =>
exec
M 'SPM');
DECLARE
stscur dbms_sqltune.sqlset_cursor;
BEGIN
OPEN stscur FOR
SELECT VALUE(P)
FROM TABLE(dbms_sqltune.select_cursor_cache(
'sql_text like ''select /*LOAD_STS*/%''',
null, null, null, null, null, null, 'ALL')) P;

-- populate the sqlset


dbms_sqltune.load_sqlset(sqlset_name => 'SPM_STS',
populate_cursor => stscur,
sqlset_owner => 'SPM');
END;
/

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 418


/home/oracle/solutions/SPM/check_baseline_used.sql:
set echo on

variable cnt number;

select sql_handle,plan_name
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

from dba_sql_plan_baselines
where sql_text like 'select /*SPM_USE*/%';

exec :cnt := dbms_spm.alter_sql_plan_baseline( -


sql_handle => 'SYS_SQL_0a9d872600ece455', -
plan_name => 'SQL_PLAN_0p7c74s0ftt2p54bc8843', -
attribute_name => 'ENABLED', -
attribute_value => 'NO');

ble
select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,
fe r a
fixed, autopurge
from dba_sql_plan_baselines
ans
where sql_text like 'select /*SPM_USE*/%';
n - t r
a no
explain plan for select /*SPM_USE*/ * from sh.sales where
h a s quantity_sold
ฺ > 40
r ) e
order by prod_id;
m ฺa Guid
select * from table(dbms_xplan.display(null,
n ฺ co null,
e n t
'basic +note'));

@ ao Stud
z i l le this
----------------------------------------------------------

c e loฺ use
r to
/home/oracle/solutions/SPM/check_baseline_used2.sql:
a
set echo on
m
( ens e
variable Z illenumber;
cnt lic
l o
rce:cnt := dbms_spm.alter_sql_plan_baseline( -
aexec
M sql_handle
plan_name
=>
=>
'SYS_SQL_0a9d872600ece455', -
'SQL_PLAN_0p7c74s0ftt2p11df68d0', -
attribute_name => 'ENABLED', -
attribute_value => 'NO');

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge
from dba_sql_plan_baselines
where sql_text like 'select /*SPM_USE*/%';

explain plan for select /*SPM_USE*/ * from sh.sales where quantity_sold > 40
order by prod_id;

select * from table(dbms_xplan.display(null, null, 'basic +note'));

----------------------------------------------------------

/home/oracle/solutions/SPM/check_baselines.sql:
set echo on

Oracle Database 11g: New Features for Administrators 419


select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,
fixed, autopurge from dba_sql_plan_baselines where sql_text like 'select
/*LOAD_AUTO*/%';
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/SPM/check_baselines2.sql:
set echo on

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge from dba_sql_plan_baselines where sql_text like 'select
/*LOAD_STS*/%';

ble
----------------------------------------------------------
fe r a
/home/oracle/solutions/SPM/check_baselines3.sql:
ans
set echo on
n - t r
a no
h a s ฺ
select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,
fixed, autopurge from dba_sql_plan_baselines where sql_text like 'select
/*LOAD_CC*/%';
ฺ a r) uide
ฺ c om ent G
a on tud
----------------------------------------------------------

l l e@ is S
i
ฺz se th
/home/oracle/solutions/SPM/check_evolve_plan.sql:
set echo on
l o
explain plan for a
rce to u
l e (m c)
select /*+ USE_NL(s
e n se FULL(c) */ c.cust_id, sum(s.quantity_sold)
FULL(s)
l
Zi s, sh.customers
from sh.sales lic c
where lo
rce by c.cust_id;
s.cust_id = c.cust_id and c.cust_id < 2
agroup
M select * from table(dbms_xplan.display(null, null));

----------------------------------------------------------

/home/oracle/solutions/SPM/check_sts.sql:
set echo on

select sql_text from dba_sqlset_statements where sqlset_name='SPM_STS';

----------------------------------------------------------

/home/oracle/solutions/SPM/cleanup_spm.sql:
set echo on

exec dbms_sqltune.drop_sql_profile(name => 'SPM_SQL_PROF');

exec :cnt := dbms_spm.drop_sql_plan_baseline('SYS_SQL_18a1ef14c17f5b75');

Oracle Database 11g: New Features for Administrators 420


select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,
fixed, autopurge
from dba_sql_plan_baselines
where sql_text like 'select /*+ USE_NL(s c) FULL(s) FULL(c) */%';

select signature, category, name, sql_text from dba_sql_profiles where name like
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'SPM%';

----------------------------------------------------------

/home/oracle/solutions/SPM/explain_query2.sql:
set echo on

explain plan for


select /*LOAD_STS*/ * from sh.sales where quantity_sold > 40 order by prod_id;
ble
fe r a
select * from table(dbms_xplan.display(null,null,'basic'));
ans
n - t r
----------------------------------------------------------
a no
/home/oracle/solutions/SPM/explain_query3.sql:
h a s ฺ
set echo on
ฺ a r) uide
explain plan for ฺ c om ent G
select /*LOAD_CC*/ * from sh.sales where
a on quantity_sold
t u d > 40 order by prod_id;

l l e@ is S
i
ฺz se th
select * from table(dbms_xplan.display(null,null,'basic'));
l o
a rce to u
l e (m ense
----------------------------------------------------------

Zonil lic
/home/oracle/solutions/SPM/explain_query4.sql:
e l
set echoo
arc
M explain plan for
select /*SPM_USE*/ * from sh.sales where quantity_sold > 40 order by prod_id;

select * from table(dbms_xplan.display(null,null,'basic'));

----------------------------------------------------------

/home/oracle/solutions/SPM/explain_query4_note.sql:
set echo on

explain plan for


select /*SPM_USE*/ * from sh.sales where quantity_sold > 40 order by prod_id;

select * from table(dbms_xplan.display(null,null,'basic +note'));

----------------------------------------------------------

/home/oracle/solutions/SPM/explain_query5.sql:
set echo on

Oracle Database 11g: New Features for Administrators 421


explain plan for
select /*+ USE_NL(s c) FULL(s) FULL(c) */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c
where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select * from table(dbms_xplan.display(null, null, 'basic +note'));

----------------------------------------------------------

/home/oracle/solutions/SPM/load_cc_baseline.sql:
set echo on

variable cnt number;


ble
fe r a
variable sqlid varchar2(20);
ans
begin
n - t r
no
select distinct sql_id into :sqlid from v$sql where sql_text like 'select
a
/*LOAD_CC*/%';
end;
h a s ฺ
/
ฺ a r) uide
print sqlid; ฺ c om ent G
a on tud
l l e@ is S
execute :cnt := dbms_spm.load_plans_from_cursor_cache(sql_id => :sqlid);

l o ฺzi se th
rce to u
----------------------------------------------------------
a
l e (m ense
/home/oracle/solutions/SPM/load_evolve_baseline.sql:
oni
set echo Z l lic
l o
rce cnt number;
avariable
M variable sqlid varchar2(20);
select /*+ USE_NL(s c) FULL(s) FULL(c) */ c.cust_id, sum(s.quantity_sold)
from sh.sales s, sh.customers c
where s.cust_id = c.cust_id and c.cust_id < 2
group by c.cust_id;

begin
select sql_id into :sqlid from v$sql where sql_text like 'select /*+ USE_NL(s
c) FULL(s) FULL(c) */%';
end;
/

execute :cnt := dbms_spm.load_plans_from_cursor_cache(sql_id => :sqlid);

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge
from dba_sql_plan_baselines
where sql_text like 'select /*+ USE_NL(s c) FULL(s) FULL(c) */%';

Oracle Database 11g: New Features for Administrators 422


----------------------------------------------------------

/home/oracle/solutions/SPM/load_use_baseline.sql:
set echo on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

variable cnt number;

variable sqlid varchar2(20);

begin
select distinct sql_id into :sqlid from v$sql where sql_text like 'select
/*SPM_USE*/%';
end;
/

ble
print sqlid;
fe r a
execute :cnt := dbms_spm.load_plans_from_cursor_cache(sql_id => :sqlid);
ans
n - t r
print cnt;
a no
select signature, sql_handle, sql_text, plan_name, origin,
h a s enabled,
ฺ accepted,
r ) e
fixed, autopurge
from dba_sql_plan_baselines m ฺa Guid
where sql_text like 'select /*SPM_USE*/%';
n ฺ co ent
@ ao Stud
z i l le this
----------------------------------------------------------

c e loฺ use
r to
/home/oracle/solutions/SPM/populate_baseline.sql:
a
set echo on
m
( ens e
variable Z illenumber;
cnt lic
l o
a rce :cnt := dbms_spm.load_plans_from_sqlset(
execute -
M sqlset_name => 'SPM_STS', -
basic_filter => 'sql_text like ''select /*LOAD_STS*/%''');

----------------------------------------------------------

/home/oracle/solutions/SPM/purge_auto_baseline.sql:
set echo on

variable cnt number;

exec :cnt := dbms_spm.drop_sql_plan_baseline('SYS_SQL_6fe28d438dfc352f');


exec :cnt := dbms_spm.drop_sql_plan_baseline('SYS_SQL_396e2e2b6cb3e334');

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge
from dba_sql_plan_baselines
where sql_text like 'select /*LOAD_AUTO*/%';

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 423


/home/oracle/solutions/SPM/purge_cc_baseline.sql:
set echo on

variable cnt number;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

exec :cnt := dbms_spm.drop_sql_plan_baseline('SYS_SQL_f6cb7f742ef93547');

print cnt;

REM Check that plan baselines were purged:

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge
from dba_sql_plan_baselines
where sql_text like 'select /*LOAD_CC*/%';
ble
fe r a
----------------------------------------------------------
ans
n - t r
/home/oracle/solutions/SPM/purge_sts_baseline.sql:
a no
set echo on
h a s ฺ
variable cnt number;
ฺ a r) uide
ฺ c om ent G
exec :cnt := dbms_spm.drop_sql_plan_baseline('SYS_SQL_a8632bd857a4a25e');
a on tud
print cnt;
l l e@ is S
i
ฺz sql_text, th plan_name, origin, enabled, accepted,
select signature, sql_handle,
l o s e
fixed, autopurge
a rce to u
where sql_text
l e m 'select
from dba_sql_plan_baselines
(like e n se /*LOAD_STS*/%';
Zi l lic
e l o
exec sys.dbms_sqltune.drop_sqlset(sqlset_name => 'SPM_STS', -
a r c sqlset_owner => 'SPM');
M
----------------------------------------------------------

/home/oracle/solutions/SPM/purge_use_baseline.sql:
set echo on

variable cnt number;

exec :cnt := dbms_spm.drop_sql_plan_baseline('SYS_SQL_0a9d872600ece455');

print cnt;

select signature, sql_handle, sql_text, plan_name, origin, enabled, accepted,


fixed, autopurge
from dba_sql_plan_baselines
where sql_text like 'select /*SPM_USE*/%';

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 424


/home/oracle/solutions/SPM/query1.sql:
set echo on

select /*LOAD_AUTO*/ * from sh.sales where quantity_sold > 40 order by prod_id;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/SPM/query2.sql:
set echo on

select /*LOAD_STS*/ * from sh.sales where quantity_sold > 40 order by prod_id;

----------------------------------------------------------

ble
/home/oracle/solutions/SPM/query3.sql:
fe r a
set echo on
ans
select /*LOAD_CC*/ * from sh.sales where quantity_sold > 40 order by prod_id;
n - t r
a no
----------------------------------------------------------
h a s ฺ
ฺ a r) uide
/home/oracle/solutions/SPM/query4.sql:
set echo on ฺ c om ent G
a on quantity_sold
tud
select /*SPM_USE*/ * from sh.sales
l e@where
i s S > 40 order by prod_id;
l
ฺzi se th
l o
rce to u
----------------------------------------------------------
a
l e (m ense
/home/oracle/solutions/SPM/report_evolve_tuning.sql:
set echo Zonil lic
l o
a rcelong 10000
set
M select dbms_sqltune.report_tuning_task(:spmtune,'TEXT') from dual;

----------------------------------------------------------

/home/oracle/solutions/SPM/spm_setup.sh:
#!/bin/bash

cd /home/oracle/solutions/SPM

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/acfsmounts/acfs_db1

export
PATH=/u01/app/oracle/acfsmounts/acfs_db1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus / as sysdba <<FIN!

Oracle Database 11g: New Features for Administrators 425


set echo on

drop user spm cascade;

create user spm identified by spm;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

grant dba to spm;

alter system flush shared_pool;

FIN!

----------------------------------------------------------

/home/oracle/solutions/SPM/tune_evolve_sql.sql:
ble
set echo on
fe r a
variable sqltext varchar2(4000);
ans
n - t r
BEGIN
a no
sum(s.quantity_sold)
h a s ฺ
:sqltext := q'# select /*+ USE_NL(s c) FULL(s) FULL(c) */ c.cust_id,

from sh.sales s, sh.customers c


ฺ a r) uide
where s.cust_id = c.cust_id
and c.cust_id < 2 ฺ c om ent G
group by c.cust_id
a on tud
#';
l l e@ is S
END; i
ฺz se th
/
l o
variable spmtune a
rce to u
l e (m ense
varchar2(30);
l
Zi := dbms_sqltune.create_tuning_task(sql_text
exec :spmtune lic => :sqltext);
l o
a rcedbms_sqltune.execute_tuning_task(:spmtune);
exec
M
----------------------------------------------------------

/home/oracle/solutions/SPMbig/explain_regressing.sh:
#!/bin/ksh

export ORACLE_SID=orcl

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

export
PATH=/u01/app/oracle/product/11.1.0/db_1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X
11R6/bin

sqlplus sys/oracle as sysdba <<FIN!

set echo on

connect apps/apps

Oracle Database 11g: New Features for Administrators 426


PROMPT @Statement 41

explain plan for


SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,


'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
ble
--------------------------
fe r a
-- TempTable 1
--------------------------
ans
(
n - t r
o
an
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id, s
ha deฺ
r )
ฺa Gui
t7.elementrange_id pg_featurevalue_15_elrg_id,
m
t8.elementgroup_id pg_featurevalue_01_elgr_id,
co ent

t4.elementgroup_id countrychannel_elgr_id,
n
@
t9.elementgroup_id period_elgr_id,ao Stud
t5.productgroup_id productgroup_id,

t2.outlet_id outlet_id,
z i l le this
c e loฺ use
t1.project_id project_id,
r to
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
a
dnfactorsales,
m e
l e ( icens
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
i l
oZ l
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
e l
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +

MarcABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
outlet_id_d
/* Additional Columns End */
FROM
lu_item_293 t5,
lu_pg_featurevalue_15 t6,
lu_elementgroup_rel t8,
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1,
lu_elementgroup_rel t9,
lu_outlet_293 t2,
lu_elementgroup_rel t3,
lu_elementgroup_rel t4
WHERE

Oracle Database 11g: New Features for Administrators 427


/* Attribute Joins */
((t1.outlet_id = t2.outlet_id
/* Customizing Begin */
AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

AND (t2.ch_featurevalue_02_id = t3.value_id)


AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
ble
)
fe r a
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
ans
AND (t1.productgroup_id = 15520) /* Push Down Filters */
n - t r
o
an
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107)) s
ha deฺ
r )
ฺa Gui
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))
AND (t4.elementgroup_id = 14786) m
co ent

AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
n
Filters */
@ ao Stud
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
z i l
AND (t9.elementgroup_id = 14659)le this
AND (t1.period_id IN
c e loฺ use
r to
(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
a
m
ElementGroup Filters */
e
i
)
l l e ( icens
oZ l
/* Fact Filters */
e lAND (t1.project_type_id = '1'

Marc AND t1.project_type_id = '1'


AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
)
GROUP BY
t2.ch_featurevalue_09_id,
t3.elementgroup_id,
t7.elementrange_id,
t8.elementgroup_id,
t4.elementgroup_id,
t5.productgroup_id,
t9.elementgroup_id,
t2.outlet_id,
t1.project_id,
/* Additional GroupBys Begin */
t1.project_id, t1.period_id, t1.outlet_id
/* Additional GroupBys End */
) tt1
GROUP BY
tt1.ch_featurevalue_09_id,

Oracle Database 11g: New Features for Administrators 428


tt1.ch_featurevalue_02_elgr_id,
tt1.pg_featurevalue_15_elrg_id,
tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

select * from table(dbms_xplan.display(null,null,'basic +note'));

FIN!

----------------------------------------------------------

/home/oracle/solutions/SPMbig/regressing.sh:
ble
#!/bin/ksh
fe r a
export ORACLE_SID=orcl
ans
n - t r
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
a no
export
h a s ฺ
a r) uide
PATH=/u01/app/oracle/product/11.1.0/db_1/bin:/bin:/usr/bin:/usr/local/bin:/usr/X

11R6/bin
ฺ c om ent G
sqlplus sys/oracle as sysdba <<FIN! on
@ a Stud
set echo on
z i l le this
c e loฺ use
connect apps/apps
a r to
set timing one ( m ns e
Z i l l li c e
PROMPTlo@Statement 41
a r ce
M SELECT
'B' || tt1.ch_featurevalue_09_id ch_featurevalue_09_id,
'G' || tt1.ch_featurevalue_02_elgr_id ch_featurevalue_02_id,
'r' || tt1.pg_featurevalue_15_elrg_id pg_featurevalue_15_id,
'G' || tt1.pg_featurevalue_01_elgr_id pg_featurevalue_01_id,
'G' || tt1.countrychannel_elgr_id countrychannel_id,
'B' || tt1.productgroup_id productgroup_id,
'G' || tt1.period_elgr_id period_id,
SUM(tt1.dnfactorsales*tt1.turnoverfactor) salesvalueselloutlets,
SUM(tt1.dnfactortotal*tt1.turnoverfactor) salesvaluetotaloutlets,
SUM(tt1.distributionfactor*tt1.dissalesflag) selloutletsavg,
SUM(tt1.distributionfactor*tt1.distotalflag) carroutletsavg
FROM
--------------------------
-- TempTable 1
--------------------------
(
SELECT /* ORDERED INDEX(t1) USE_HASH(t1) INDEX(t2) */
t2.ch_featurevalue_09_id ch_featurevalue_09_id,
t3.elementgroup_id ch_featurevalue_02_elgr_id,
t7.elementrange_id pg_featurevalue_15_elrg_id,

Oracle Database 11g: New Features for Administrators 429


t8.elementgroup_id pg_featurevalue_01_elgr_id,
t4.elementgroup_id countrychannel_elgr_id,
t5.productgroup_id productgroup_id,
t9.elementgroup_id period_elgr_id,
t2.outlet_id outlet_id,
t1.project_id project_id,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dnfactorsales,
MAX(t1.pd_turnover_factor*t1.pd_projection_factor) turnoverfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) dnfactortotal,
MAX(t1.pd_distribution_factor) distributionfactor,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units))))
dissalesflag,
SIGN(SUM(ABS(DECODE(t1.pd_sales_units,NULL,0,t1.pd_sales_units)) +
ble
ABS(DECODE(t1.pd_purchase_units,NULL,0,t1.pd_purchase_units)) +
fe r a
ABS(DECODE(t1.pd_stock_new_units,NULL,0,t1.pd_stock_new_units)))) distotalflag,
/* Additional Columns Begin */
ans
t1.project_id project_id_d, t1.period_id period_id_d, t1.outlet_id
n - t r
o
an
outlet_id_d

FROM
/* Additional Columns End */
s
ha deฺ
lu_item_293 t5, r )
ฺa Gui
lu_pg_featurevalue_15 t6, m
co ent
lu_elementgroup_rel t8,
n ฺ
lu_elementrange_rel t7,
fact_pd_out_itm_293 t1, @ ao Stud
lu_elementgroup_rel t9,
z i l le this
lu_outlet_293 t2,
c e loฺ use
r
lu_elementgroup_rel t3,
a to
m
lu_elementgroup_rel t4
e
WHERE
i l l e ( icens
oZ l
/* Attribute Joins */
e l ((t1.outlet_id = t2.outlet_id

Marc /* Customizing Begin */


AND t1.period_id = t2.period_id
AND t1.project_id = t2.project_id)
/* Customizing End */
AND (t2.ch_featurevalue_02_id = t3.value_id)
AND (t2.country_channel_id = t4.value_id)
AND (t1.item_id = t5.item_id
/* Customizing Begin */
AND t1.productgroup_id = t5.productgroup_id)
/* Customizing End */
AND (t5.pg_featurevalue_15_id = t6.pg_featurevalue_15_id)
AND (t6.pg_featurevalue_15_num BETWEEN t7.lbound AND t7.ubound)
AND (t5.pg_featurevalue_01_id = t8.value_id)
AND (t1.period_id = t9.value_id)
)
/* Attribute Filters */
AND ((t5.productgroup_id = 15520)
AND (t1.productgroup_id = 15520) /* Push Down Filters */
AND (t2.ch_featurevalue_09_id = 7379)
AND (t3.elementgroup_id IN (3481,3482))
AND (t7.elementrange_id IN (3091,3092,3093,3107))
AND (t8.elementgroup_id IN (1959,1960,1961,1962,8574))

Oracle Database 11g: New Features for Administrators 430


AND (t4.elementgroup_id = 14786)
AND (t2.country_channel_id IN (1873,1882)) /* Resolved ElementGroup
Filters */
AND (t1.country_channel_id IN (1873,1882)) /* Push Down Filters */
AND (t9.elementgroup_id = 14659)
AND (t1.period_id IN
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

(20030699999060,20030799999030,20030799999060,20030799999120)) /* Resolved
ElementGroup Filters */
)
/* Fact Filters */
AND (t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
AND t1.project_type_id = '1'
ble
)
fe r a
GROUP BY
t2.ch_featurevalue_09_id,
ans
t3.elementgroup_id,
n - t r
o
an
t7.elementrange_id,
t8.elementgroup_id,
t4.elementgroup_id, s
ha deฺ
t5.productgroup_id, r )
ฺa Gui
t9.elementgroup_id, m
co ent
t2.outlet_id,
n ฺ
t1.project_id,
/* Additional GroupBys Begin */ @ ao Stud
z i l le this
t1.project_id, t1.period_id, t1.outlet_id

c e loฺ use
/* Additional GroupBys End */
) tt1
a r to
GROUP BY
m e
l e ( icens
tt1.ch_featurevalue_09_id,
i l
oZ l
tt1.ch_featurevalue_02_elgr_id,
e l
tt1.pg_featurevalue_15_elrg_id,

Marc tt1.pg_featurevalue_01_elgr_id,
tt1.countrychannel_elgr_id,
tt1.productgroup_id,
tt1.period_elgr_id
/

set timing off

FIN!

----------------------------------------------------------

/home/oracle/solutions/SQLMONITOR/moni_cleanup.sql:
set echo on

/*== Drop test tablespace and user ==*/

DROP USER moni CASCADE;

DROP TABLESPACE moni_tbs INCLUDING CONTENTS AND DATAFILES;

Oracle Database 11g: New Features for Administrators 431


----------------------------------------------------------

/home/oracle/solutions/SQLMONITOR/moni_setup.sql:
set echo on
set long 10000000
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set longchunksize 10000000


set linesize 200
set pagesize 1000

/*== Drop and create a test tablespace and user ==*/

DROP USER moni CASCADE;

ble
DROP TABLESPACE moni_tbs INCLUDING CONTENTS;
fe r a
CREATE SMALLFILE TABLESPACE MONI_TBS
ans
DATAFILE '+DATA'
n - t r
o
an
SIZE 100M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE 32767M NOLOGGING
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
s
ha deฺ
r )
ฺa temp; ui
CREATE USER moni IDENTIFIED BY moni
DEFAULT TABLESPACE moni_tbs TEMPORARY TABLESPACE m G
GRANT connect, resource, dba to moni; on
ฺco dent
@ a Stu
/*== Drop and create a MONI_TEST
z i l e is MONI user ==*/
l tablethas
c e loฺ use
CONNECT moni/moni
a r to
m e
l e ( icepurge;
DROP TABLE moni_test
i l ns
Z l
CREATEloTABLE moni_test(c number, d varchar2(500));
a r ce
M begin
for i in 1..200000 loop
insert into moni_test
values(1,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaa');
end loop;
commit;
end;
/

CREATE INDEX moni_test_c_indx on moni_test(c);

/*== Start long running query ==*/

SELECT count(*) FROM moni_test t1, moni_test t2


WHERE t1.c=t2.c AND t1.c=1;

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 432


/home/oracle/solutions/SQL_Repair/new_run_demo_part1.sql:
set echo on

-- This example generates a workaround for a crash. This bug has already
-- been fixed but we toggle the bug fix using an underscore parameter
-- which uses the (internal) feature called bug fix control.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- This script will pause periodically to allow you to read the comments
-- and see the output of the previous command on the screen. Just press
-- return to make the demo resume.

pause

-- To begin the demo we will create the user sh and grant


-- advisor privileges to him.

pause
ble
fe r a
grant connect, resource, dba, query rewrite, unlimited tablespace to sh
identified by sh;
ans
n - t r
-- Next we need to create and populate the table used by the demo.
a no
-- We will also create an index on the table;
h a s ฺ
pause
ฺ a r) uide
connect sh/sh;
ฺ c om ent G
a onto switch
tud off the code line that
-- In order to crash the system we @ need S
le typethofiscrash. We can switch off the code
--- normal protects against this
z i l
- by unsetting some underscore
c e loฺ uparameters.
se
-- switch the code a
r to
alter sessione set m off
e
( "_convert_set_to_join"=TRUE;
ns
Z i
alter session l l set li c e
"_sdiag_crash"="SET_TO_JOIN";
l o
e that the code line has been switched off lets get the execution
a r
-- cNow
M -- plan for a simple statement.
pause

--- This statement caused the system to crash.

-- The plan shows that we we will do a full table scan oun r.


-- If we execut this simple system it will crash the system.
--- explain the plan

pause

explain plan for


select * from (
select prod_id, cust_id, time_id, channel_id from sales
intersect
select prod_id, cust_id, time_id, channel_id from sales
where channel_id = 'S'
minus
select prod_id, cust_id, time_id, channel_id from sales
where prod_id < 100

Oracle Database 11g: New Features for Administrators 433


order by 1 desc, 2, 3 desc, 4 desc);

----------------------------------------------------------

/home/oracle/solutions/SQL_Repair/new_run_demo_part2.sql:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

connect sh/sh;
set lines 10000;
set pages 10000;
set long 20000;
set serveroutput on;
SET TRIMSPOOL ON;
SET TAB OFF;
SET FEEDBACK 1;

alter system flush shared_pool;


ble
fe r a
set echo on;
ans
-- At this point your previous session has crashed due to a problem
n - t r
-- in the compilation. We now want to use the SQL Repair Advisor
a no
--
--
to fit that problem.
Before we can run the SQL Repair Advisor we need to create a
h a s ฺ
--
a r) uide
diagnosis task using dbms_sqldiag. We need to specify the SQL text

--
-- ฺ c om ent G
for the statement that causes the crash and a task name. We also need
to specify the problem type. There are three possible problem types

-- PROBLEM_TYPE_COMPILATION_ERROR@a
on tud
l e i s S
i l h
oฺz use t
-- PROBLEM_TYPE_EXECUTION_ERROR
-- WRONG_RESULTS
e l
a rc the statement
to
-- In this cause since
( m s e failed during execution we will use

i l l e icen
-- PROBLEM_TYPE_COMPILATION_ERROR. When the SQL Repair Advisor completes
-- we will
l o Z run l
r c e
-- dbms_sqldiag.report_diagnosis_task to output the results report to the
a
screen.
M pause
exec dbms_sqldiag.drop_diagnosis_task('sqldiag_set_to_join');

variable t_id varchar2(50);


variable rep_out clob;

begin
:t_id := dbms_sqldiag.create_diagnosis_task(
sql_text => 'select * from (
select prod_id, cust_id, time_id, channel_id from sales
intersect
select prod_id, cust_id, time_id, channel_id from sales
where channel_id = ''S''
minus
select prod_id, cust_id, time_id, channel_id from sales
where prod_id < 100
order by 1 desc, 2, 3 desc, 4 desc)',
task_name => 'sqldiag_set_to_join',
problem_type =>DBMS_SQLDIAG.PROBLEM_TYPE_EXECUTION_ERROR);

Oracle Database 11g: New Features for Administrators 434


dbms_sqltune.set_tuning_task_parameter(
:t_id,
'_SQLDIAG_FINDING_MODE',
dbms_sqldiag.SQLDIAG_FINDINGS_FILTER_PLANS);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

dbms_output.put_line ('t_id = ' || :t_id);


end;
/

alter session set "_convert_set_to_join"=TRUE;


alter session set "_sdiag_crash"="SET_TO_JOIN";

begin
dbms_sqldiag.execute_diagnosis_task (:t_id);

ble
dbms_output.put_line ('executed t_id = ' || :t_id);
fe r a
end;
/
ans
n - t r
alter session set "_sdiag_crash"="NONE";
a no
begin
h a s ฺ
:rep_out := dbms_sqldiag.report_diagnosis_task (:t_id,
ฺ a r) uide
DBMS_SQLDIAG.TYPE_TEXT);
ฺ c om ent G
dbms_output.put_line ('Report : ' ||on:rep_out);
@ a Stud
end;
z i l le this
/
c e loฺ use
r
-- The above reportatells usto
-- and it hase found ( m a n s epatch
that the statement fails during compilation

-- it from Z i l l
crashing li c e
in
SQL
the future.
for this statement that will prevent
However, running the repair advisor
e
-- wontl o fix the problem automatically. If we run our problematic SQL
a
--rcstatement now the session will crash.
M pause

connect sh/sh

-- We need to accept the SQL Patch that the SQL Repair Advisor recommended
before
-- our SQL statement will be able to run without crashing. To accept the SQL
Patch
-- we must execute dbms_sqldiag.accept_sql_patch and pass it task name

pause
execute dbms_sqldiag.accept_sql_patch(task_name => 'sqldiag_set_to_join', name
=> 'set_to_join_patch', task_owner => 'SH', replace => TRUE);

-- Now that we have successfully accepted the SQL patch we should be able to
-- run our statement without it crashing. Lets first look at the execution
-- plan to see if it has changed.

pause

Oracle Database 11g: New Features for Administrators 435


explain plan for
select * from (
select prod_id, cust_id, time_id, channel_id from sales
intersect
select prod_id, cust_id, time_id, channel_id from sales
where channel_id = 'S'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

minus
select prod_id, cust_id, time_id, channel_id from sales
where prod_id < 100
order by 1 desc, 2, 3 desc, 4 desc);

-- display the plan


select plan_table_output from
table(dbms_xplan.display('plan_table',null,'advanced'));

ble
-- Finally we need to restore the system back the way we found it.
fe r a
-- We must drop the SQL Patch we have accepted and turn back on the
-- original code path that prevented this problem in the first place.
ans
pause
n - t r
a no
execute dbms_sqldiag.drop_sql_patch('set_to_join_patch');
h a s ฺ
----------------------------------------------------------
ฺ a r) uide
/home/oracle/solutions/SQL_Repair/old_sql_repair1.sql:ฺ c om ent G
set echo on
a on tud
l e@ for i s Sa crash. This bug has already
i l
ฺzthe bug
-- This example generates a workaround h
t using an underscore parameter
-- been fixed but we toggle
e l o s e fix
u called bug fix control.
rc
-- which uses the (internal)
t o
feature
-- This script willapause periodically
( m s e to allow you to read the comments

cendemo resume.
illemake lithe
-- and see the output of the previous command on the screen. Just press
-- returnZto

r c elo
Ma
pause

-- To begin the demo we will create the user scott and grant
-- advisor privileges to him.

pause

grant connect, resource, dba, query rewrite, unlimited tablespace to scott


identified by tiger;
alter user scott account unlock;

-- Next we need to create and populate the table used by the demo.
-- We will also create an index on the table;

pause
connect scott/tiger;

drop table t;

create table t(a varchar(40), b number, c varchar(240), d varchar(240));

Oracle Database 11g: New Features for Administrators 436


-- create index tc on t(b, d, a);

insert into t values('a', 1, 'b', 'c');


insert into t values('a', 1, 'x', 'c');
insert into t values('e', 2, 'f', 'g');
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- In order to crash the system we need to switch off the code line that
-- normal protects against this type of crash. We can switch off the code
-- using the (internal) feature called bug fix control.

pause

-- switch the code


alter session set "_fix_control"="5868490:OFF";
-- alter session set optimizer_dynamic_sampling = 0;

ble
-- Now that the code line has been switched off lets get the execution
fe r a
-- plan for a simple delete statement.
ans
pause
n - t r
a no
--- explain the plan
h a s ฺ
explain plan for delete from t t1 where t1.a = 'a' and rowid <> (select
a r) uide
max(rowid) from t t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

--- display the plan ฺ c om ent G
a on tud
select plan_table_output from table(dbms_xplan.display('plan_table',null));

l e@do a full
i s Stable scan oun r.
-- The plan shows that we we iwill l h
itt will crash the system.
-- If we execut this simple
e l oฺzsystemu s e
a rc t o
Pause
l e
--- This statement(m caused
e n sethe system to crash.
delete from l
Zi t t1 where
lic t1.a = 'a' and rowid <> (select max(rowid) from t t2
where lo
e t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);
arc
M ----------------------------------------------------------
/home/oracle/solutions/SQL_Repair/old_sql_repair2.sql:
connect scott/tiger
set lines 10000;
set pages 10000;
set long 20000;
set serveroutput on;
SET TRIMSPOOL ON;
SET TAB OFF;
SET FEEDBACK 1;

alter system flush shared_pool;

set echo on;

-- At this point your previous session has crashed due to a problem


-- with our delete statement. We now want to use the SQL Repair Advisor
-- to fit that problem. Before we begin to fix this problem lets ensure
-- that the actual code that prevents this issue in real life is switched off.

Oracle Database 11g: New Features for Administrators 437


pause

alter session set "_fix_control"="5868490:OFF";

-- Before we can run the SQL Repair Advisor we need to create a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- diagnosis task using dbms_sqldiag. We need to specify the SQL text


-- for the statement that causes the crash and a task name. We also need
-- to specify the problem type. There are three possible problem types

-- PROBLEM_TYPE_COMPILATION_ERROR
-- PROBLEM_TYPE_EXECUTION_ERROR
-- WRONG_RESULTS

-- In this cause since the statement failed during execution we will use
-- PROBLEM_TYPE_EXECUTION_ERROR. When the SQL Repair Advisor completes we will
ble
run
fe r a
-- dbms_sqldiag.report_diagnosis_task to output the results report to the
screen.
ans
n - t r
pause
a no
exec dbms_sqldiag.drop_diagnosis_task('sqldiag_bug_5869490');
h a s ฺ
ฺ a r) uide
variable rep_out clob;
ฺ c om ent G
declare
varchar2(50); @a
on tud
t_id
l e i s S
begin i l
ฺz se t h
l o
t_id := dbms_sqldiag.create_diagnosis_task(
e from t u
sql_text => 'delete
a rcwhere t o t1 where t1.a = ''a'' and rowid <> (select

( s e
m'sqldiag_bug_5869490',
max(rowid) from t t2 t1.a= t2.a and t1.b = t2.b and t1.d=t2.d)',

cen
task_namee =>
Z ill =>DBMS_SQLDIAG.PROBLEM_TYPE_COMPILATION_ERROR);
problem_type l i
r c elo
Ma t_id,
dbms_sqltune.set_tuning_task_parameter(

'_SQLDIAG_FINDING_MODE',
dbms_sqldiag.SQLDIAG_FINDINGS_FILTER_PLANS);

dbms_output.put_line ('t_id = ' || t_id);

dbms_sqldiag.execute_diagnosis_task (t_id);

dbms_output.put_line ('executed t_id = ' || t_id);

:rep_out := dbms_sqldiag.report_diagnosis_task (t_id, DBMS_SQLDIAG.TYPE_TEXT);

end;
/

print rep_out

-- The above report tells us that the statement fails during execute
-- and it has found a SQL patch for this statement that will prevent
-- it from crashing in the future. However, unning the repair advisor
-- wont fix the problem automatically. If we run our problematic SQL

Oracle Database 11g: New Features for Administrators 438


-- statement now the session will crash.

pause

delete from t t1 where t1.a = 'a' and rowid <> (select max(rowid) from t t2
where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- connect scott/tiger

-- We need to accept the SQL Patch that the SQL Repair Advisor recommended
before
-- our SQL statement will be able to run without crashing. To accept the SQL
Patch
-- we must execute dbms_sqldiag.accept_sql_patch and pass it task name

pause
ble
execute dbms_sqldiag.accept_sql_patch(task_name => 'sqldiag_bug_5869490',
fe r a
task_owner => 'SCOTT', replace => TRUE);
ans
-- Now that we have successfully accepted the SQL patch we should be able to
n - t r
no
-- run our statement without it crashing. Lets first look at the execution
a
-- plan to see if it has changed.
h a s ฺ
pause
ฺ a r) uide
ฺ c om t
= 'a'nand
Growid <> (select
max(rowid) from t t2 where t1.a= t2.a o
a n t1.bud= et2.b and t1.d=t2.d);
explain plan for delete from t t1 where t1.a
and
-- display the plan @ S t
select plan_table_output fromill
z e t hi s
ฺ e
elo o us
table(dbms_xplan.display('plan_table',null,'advanced'));
r
-- Now lets executeait.
c t
( m s e
pause Z ille licen
r c elofrom t t1 where t1.a = 'a' and rowid <> (select max(rowid) from t t2
a
delete
M where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);
-- Finally we need to restore the system back the way we found it.
-- We must drop the SQL Patch we have accepted and turn back on the
-- original code path that prevented this problem in the first place.

-- execute dbms_sqldiag.drop_sql_patch(

alter session set "_fix_control"="5868490:ON";

----------------------------------------------------------

/home/oracle/solutions/SQL_Repair/sql_repair1.sql:
set echo on

-- This example generates a workaround for a crash. This bug has already
-- been fixed but we toggle the bug fix using an underscore parameter
-- which uses the (internal) feature called bug fix control.
-- This script will pause periodically to allow you to read the comments
-- and see the output of the previous command on the screen. Just press

Oracle Database 11g: New Features for Administrators 439


-- return to make the demo resume.

pause

-- To begin the demo we will create the user scott and grant
-- advisor privileges to him.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

pause

grant connect, resource, dba, query rewrite, unlimited tablespace to scott


identified by tiger;

alter user scott account unlock;

-- Next we need to create and populate the table used by the demo.
-- We will also create an index on the table;
ble
fe r a
pause
connect scott/tiger;
ans
n - t r
drop table simple_table;
a no
create table simple_table(a varchar(40), b number, c varchar(240),
h a s ฺ d
varchar(240));
ฺ a r) uide
create index tc on simple_table(b, d, a);ฺco
m nt G
a de
on'b', tu'c');
insert into simple_table values('a',
l e 1, S 'c');
@ 1,is'x',
i l h
ฺz se t2, 'f', 'g');
insert into simple_table values('a',
insert into simple_table o
e l values('e',
u
a rcthe system
t o
( m
-- In order to crash
s e
n feature type
we need to switch off the code line that

ille(internal)e
-- normal protects against this of crash. We can switch off the code
-- using Zthe li c called bug fix control.
l o
rce
apause
M -- switch the code
alter system set "_fix_control"="5868490:OFF";
-- alter session set optimizer_dynamic_sampling = 0;

-- Now that the code line has been switched off lets get the execution
-- plan for a simple delete statement.

pause

--- explain the plan


explain plan for delete
/*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")

Oracle Database 11g: New Features for Administrators 440


OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
*/
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

--- display the plan


select plan_table_output from table(dbms_xplan.display('plan_table',null));
ble
fe r a
-- The plan shows that we we will do a full table scan oun r.
-- If we execut this simple system it will crash the system.
ans
n - t r
o
an
Pause
--- This statement caused the system to crash.
delete s
ha deฺ
/*+ r )
ฺa Gui
USE_HASH_AGGREGATION(@"SEL$80F8B8C6") m
co ent
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
n ฺ
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")@ ao Stud
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")

z i l le this
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
c e loฺ use
OUTLINE(@"SEL$1")
a r to
m
OUTLINE(@"SEL$AD0B6B07")
e
l e ( icens
OUTLINE(@"SEL$7D4DB4AA")
i l
oZ l
UNNEST(@"SEL$1")
e lOUTLINE(@"SEL$75B5BFA2")

Marc MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
*/
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

----------------------------------------------------------

/home/oracle/solutions/SQL_Repair/sql_repair2.sql:

set echo on

connect scott/tiger
set lines 10000;
set pages 10000;
set long 20000;

Oracle Database 11g: New Features for Administrators 441


set serveroutput on;
SET TRIMSPOOL ON;
SET TAB OFF;
SET FEEDBACK 1;

alter system flush shared_pool;


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set echo on;

-- At this point your previous session has crashed due to a problem


-- with our delete statement. We now want to use the SQL Repair Advisor
-- to fit that problem. Before we begin to fix this problem lets ensure
-- that the actual code that prevents this issue in real life is switched off.

pause

ble
alter system set "_fix_control"="5868490:OFF";
fe r a
-- Before we can run the SQL Repair Advisor we need to create a
ans
-- diagnosis task using dbms_sqldiag. We need to specify the SQL text
n - t r
-- for the statement that causes the crash and a task name. We also need
a no
--
s ฺ
to specify the problem type. There are three possible problem types
h a
-- PROBLEM_TYPE_COMPILATION_ERROR
ฺ a r) uide
-- PROBLEM_TYPE_EXECUTION_ERROR
-- WRONG_RESULTS ฺ c om ent G
a on duringtud execution we will use
-- In this cause since the statement @ failed
le Whenththe S
is SQL Repair Advisor completes we will
-- PROBLEM_TYPE_EXECUTION_ERROR.
z i l
run
c e loฺ use to output the results report to the
r to
-- dbms_sqldiag.report_diagnosis_task
a
screen.
m e
i l l e ( icens
pause
l o Z l
rcedbms_sqldiag.drop_diagnosis_task('sqldiag_bug_5869490');
aexec
M declare
rep_out clob;
t_id varchar2(50);
begin
t_id := dbms_sqldiag.create_diagnosis_task(
sql_text => 'delete /*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS

Oracle Database 11g: New Features for Administrators 442


OPT_PARAM(''_optimizer_cost_model'' ''fixed'')
DB_VERSION(''11.1.0.7'')
OPTIMIZER_FEATURES_ENABLE(''11.1.0.7'')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
*/
from simple_table t1 where t1.a = ''a'' and rowid <> (select max(rowid) from
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d)',


task_name => 'sqldiag_bug_5869490',
problem_type =>DBMS_SQLDIAG.PROBLEM_TYPE_COMPILATION_ERROR);

dbms_sqltune.set_tuning_task_parameter(
t_id,
'_SQLDIAG_FINDING_MODE',
dbms_sqldiag.SQLDIAG_FINDINGS_FILTER_PLANS);

dbms_output.put_line ('t_id = ' || t_id);


ble
fe r a
dbms_sqldiag.execute_diagnosis_task (t_id);
ans
dbms_output.put_line ('executed t_id = ' || t_id);
n - t r
a no
h a s ฺ
rep_out := dbms_sqldiag.report_diagnosis_task (t_id, DBMS_SQLDIAG.TYPE_TEXT);

dbms_output.put_line ('Report : ' || rep_out); r)


ฺ a u ide
end; ฺ c om ent G
/
a on tud
l e@the statement
i s S fails during execute
-- The above report tells us ithat l
ฺz for h
t statement that will prevent
-- and it has found a SQLopatch
e l s e this
u However, unning the repair advisor
-- it from crashing in
a rc the o
future.
t
( mthe session
-- wont fix the problem
s e
automatically. If we run our problematic SQL

cen
-- statement e
ill
now will crash.

pause lo
Z l i
e
arc
M connect scott/tiger
-- We need to accept the SQL Patch that the SQL Repair Advisor recommended
before
-- our SQL statement will be able to run without crashing. To accept the SQL
Patch
-- we must execute dbms_sqldiag.accept_sql_patch and pass it task name

pause
execute dbms_sqldiag.accept_sql_patch(task_name => 'sqldiag_bug_5869490', name
=> 'delete_patch', task_owner => 'SCOTT', replace => TRUE);

-- Now that we have successfully accepted the SQL patch we should be able to
-- run our statement without it crashing. Lets first look at the execution
-- plan to see if it has changed.

pause

explain plan for


delete
/*+

Oracle Database 11g: New Features for Administrators 443


USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
ble
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
fe r a
*/
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
ans
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
n - t r
o
an
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

-- display the plan s


ha deฺ
select plan_table_output from r )
ฺa Gui
table(dbms_xplan.display('plan_table',null,'advanced')); m
co ent
n ฺ
-- Now lets execute it.
@ ao Stud
pause
z i l le this
c e loฺ use
delete
a r to
/*+
m e
l e ( icens
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
i l
l o Z l
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")

rce FULL(@"SEL$80F8B8C6"
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")

M a "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
*/
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

-- Finally we need to restore the system back the way we found it.
-- We must drop the SQL Patch we have accepted and turn back on the
-- original code path that prevented this problem in the first place.

Oracle Database 11g: New Features for Administrators 444


execute dbms_sqldiag.drop_sql_patch('delete_patch');

alter system set "_fix_control"="5868490:ON";

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/SQL_Repair/sql_repair_advisor/run_demo_part1.sql:
set echo on

-- This example generates a workaround for a crash. This bug has already
-- been fixed but we toggle the bug fix using an underscore parameter
-- which uses the (internal) feature called bug fix control.
-- This script will pause periodically to allow you to read the comments
-- and see the output of the previous command on the screen. Just press
-- return to make the demo resume.
ble
fe r a
pause
ans
-- To begin the demo we will create the user scott and grant
n - t r
-- advisor privileges to him.
a no
pause
h a s ฺ
e
grant connect, resource, dba, query rewrite, m ฺar) Gtablespace
unlimited uid to scott
c o n t
identified by tiger;
a o nฺ ude
alter user scott account unlock; @ S t
z l e
ilpopulatet i s
hthe
-- Next we need to createoand
l ฺ e
s the table; table used by the demo.
r c e
an indexuon
-- We will also create
m a e to
pause
i l l e ( icens
Z
connect scott/tiger;
l o l
rcetable simple_table;
adrop
M create table simple_table(a varchar(40), b number, c varchar(240), d
varchar(240));

create index tc on simple_table(b, d, a);

insert into simple_table values('a', 1, 'b', 'c');


insert into simple_table values('a', 1, 'x', 'c');
insert into simple_table values('e', 2, 'f', 'g');

-- In order to crash the system we need to switch off the code line that
-- normal protects against this type of crash. We can switch off the code
-- using the (internal) feature called bug fix control.

pause

-- switch the code


alter system set "_fix_control"="5868490:OFF";
-- alter session set optimizer_dynamic_sampling = 0;

-- Now that the code line has been switched off lets get the execution

Oracle Database 11g: New Features for Administrators 445


-- plan for a simple delete statement.

pause

--- explain the plan


explain plan for delete
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
ble
UNNEST(@"SEL$1")
fe r a
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
ans
OUTLINE_LEAF(@"SEL$80F8B8C6")
n - t r
ALL_ROWS
a no
OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
h a s ฺ
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
ฺ a r) uide
*/
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
ฺ c om ent G
a on tud
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from

l l e@ is S
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);
i
ฺz se th
--- display the plan
l o
select plan_table_output
a rce fromtotable(dbms_xplan.display('plan_table',null));
u
l
-- The plan showse (mthate n sewe will do a full table scan oun r.
we
-- If we Z i l
execut lic simple system it will crash the system.
this
l o
rce
aPause
M --- This statement caused the system to crash.
delete
/*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")

Oracle Database 11g: New Features for Administrators 446


*/
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

----------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/home/oracle/solutions/SQL_Repair/sql_repair_advisor/run_demo_part2.sql:

set echo on

connect scott/tiger
set lines 10000;
set pages 10000;
set long 20000;
set serveroutput on;
ble
SET TRIMSPOOL ON;
fe r a
SET TAB OFF;
SET FEEDBACK 1;
ans
n - t r
alter system flush shared_pool;
a no
set echo on;
h a s ฺ
ฺ a r)due touiadeproblem
om
-- At this point your previous session has crashed
-- with our delete statement. We now wantฺc to n t G
e problem lets ensure
use the SQL Repair Advisor
-- to fit that problem. Before we begin
a nto fixudthis
othis
-- that the actual code that prevents t
@ is S in real life is switched off.
issue
l l e
pause
l o ฺzi se th
a rce to u
l e (m ense
alter system set "_fix_control"="5868490:OFF";
l
i can run
-- BeforeZwe lic the SQL Repair Advisor we need to create a
l o
e the statement that causes the crash and a task name. We also need
-- diagnosis task using dbms_sqldiag. We need to specify the SQL text
a r
-- cfor
M -- to specify the problem type. There are three possible problem types
-- PROBLEM_TYPE_COMPILATION_ERROR
-- PROBLEM_TYPE_EXECUTION_ERROR
-- WRONG_RESULTS

-- In this cause since the statement failed during execution we will use
-- PROBLEM_TYPE_EXECUTION_ERROR. When the SQL Repair Advisor completes we will
run
-- dbms_sqldiag.report_diagnosis_task to output the results report to the
screen.

pause

exec dbms_sqldiag.drop_diagnosis_task('sqldiag_bug_5869490');

declare
rep_out clob;
t_id varchar2(50);
begin
t_id := dbms_sqldiag.create_diagnosis_task(

Oracle Database 11g: New Features for Administrators 447


sql_text => 'delete /*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")
OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
OPT_PARAM(''_optimizer_cost_model'' ''fixed'')
ble
DB_VERSION(''11.1.0.7'')
fe r a
OPTIMIZER_FEATURES_ENABLE(''11.1.0.7'')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
ans
*/
n - t r
o
an
from simple_table t1 where t1.a = ''a'' and rowid <> (select max(rowid) from

task_name => 'sqldiag_bug_5869490', s


simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d)',
ha deฺ
r )
ฺa Gui
problem_type =>DBMS_SQLDIAG.PROBLEM_TYPE_COMPILATION_ERROR);

dbms_sqltune.set_tuning_task_parameter(ฺco
m n t
n e
t_id,
'_SQLDIAG_FINDING_MODE', @ ao Stud
z i l le this
dbms_sqldiag.SQLDIAG_FINDINGS_FILTER_PLANS);

c loฺ e
('t_id =u's|| t_id);
e
dbms_output.put_line
a r to
m e
i l l e ( icens
dbms_sqldiag.execute_diagnosis_task (t_id);

l o Z l
r c e
dbms_output.put_line ('executed t_id = ' || t_id);

Ma rep_out := dbms_sqldiag.report_diagnosis_task (t_id, DBMS_SQLDIAG.TYPE_TEXT);

dbms_output.put_line ('Report : ' || rep_out);

end;
/

-- The above report tells us that the statement fails during execute
-- and it has found a SQL patch for this statement that will prevent
-- it from crashing in the future. However, unning the repair advisor
-- wont fix the problem automatically. If we run our problematic SQL
-- statement now the session will crash.

pause

connect scott/tiger

-- We need to accept the SQL Patch that the SQL Repair Advisor recommended
before
-- our SQL statement will be able to run without crashing. To accept the SQL
Patch

Oracle Database 11g: New Features for Administrators 448


-- we must execute dbms_sqldiag.accept_sql_patch and pass it task name

pause
execute dbms_sqldiag.accept_sql_patch(task_name => 'sqldiag_bug_5869490', name
=> 'delete_patch', task_owner => 'SCOTT', replace => TRUE);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- Now that we have successfully accepted the SQL patch we should be able to
-- run our statement without it crashing. Lets first look at the execution
-- plan to see if it has changed.

pause

explain plan for


delete
/*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
ble
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
fe r a
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
ans
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
n - t r
o
an
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07") s
ha deฺ
OUTLINE(@"SEL$7D4DB4AA") r )
ฺa Gui
UNNEST(@"SEL$1") m
co ent
OUTLINE(@"SEL$75B5BFA2")
n ฺ
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6") @ ao Stud
ALL_ROWS
z i l le this
c e loฺ use
OPT_PARAM('_optimizer_cost_model' 'fixed')
r
DB_VERSION('11.1.0.7')
a to
m e
OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
l e ( icens
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
i l
oZ l
*/
e l
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
arc
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);
M -- display the plan
select plan_table_output from
table(dbms_xplan.display('plan_table',null,'advanced'));

-- Now lets execute it.

pause

delete
/*+
USE_HASH_AGGREGATION(@"SEL$80F8B8C6")
USE_HASH(@"SEL$80F8B8C6" "T1"@"DEL$1")
LEADING(@"SEL$80F8B8C6" "T2"@"SEL$1" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T1"@"DEL$1")
FULL(@"SEL$80F8B8C6" "T2"@"SEL$1")
OUTLINE(@"DEL$1")
OUTLINE(@"SEL$1")
OUTLINE(@"SEL$AD0B6B07")
OUTLINE(@"SEL$7D4DB4AA")
UNNEST(@"SEL$1")

Oracle Database 11g: New Features for Administrators 449


OUTLINE(@"SEL$75B5BFA2")
MERGE(@"SEL$7D4DB4AA")
OUTLINE_LEAF(@"SEL$80F8B8C6")
ALL_ROWS
OPT_PARAM('_optimizer_cost_model' 'fixed')
DB_VERSION('11.1.0.7')
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

OPTIMIZER_FEATURES_ENABLE('11.1.0.7')
NO_INDEX(@"SEL$1" "T2"@"SEL$1")
*/
from simple_table t1 where t1.a = 'a' and rowid <> (select max(rowid) from
simple_table t2 where t1.a= t2.a and t1.b = t2.b and t1.d=t2.d);

-- Finally we need to restore the system back the way we found it.
-- We must drop the SQL Patch we have accepted and turn back on the
-- original code path that prevented this problem in the first place.

ble
execute dbms_sqldiag.drop_sql_patch('delete_patch');
fe r a
alter system set "_fix_control"="5868490:ON";
ans
n - t r
o
an
----------------------------------------------------------

/home/oracle/solutions/SecF/check_encrypt.sql: s
ha deฺ
connect sf_demo/oracle_4U r )
ฺa Gui
set pause off m
co ent
set echo on
n ฺ
col TABLE_NAME format a18; @ ao Stud
col COLUMN_NAME format a19; ille h is
col ENCRYPTION_ALG formatoa17; z
l ฺ use t
r c e
SELECT *
m a e to
l e ( icens
FROM USER_ENCRYPTED_COLUMNS
i l
/
l o Z l
e
arc
M ----------------------------------------------------------
/home/oracle/solutions/SecF/cleanup.sql:
set echo on
drop user sf_demo cascade
/
drop tablespace secf_tbs1 including contents and datafiles
/
drop tablespace secf_tbs2 including contents and datafiles
/

----------------------------------------------------------

/home/oracle/solutions/SecF/encrypt_lob.sql:
set serveroutput on
set verify on
set term on
set lines 200
set pause off
set echo on

Oracle Database 11g: New Features for Administrators 450


connect / as sysdba

ALTER TABLE sf_demo.resumes


MODIFY (resume ENCRYPT USING 'AES192')
/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

----------------------------------------------------------

/home/oracle/solutions/SecF/mig_bf_to_sf.sql:
-- run this script as SYS
connect / as sysdba

set echo on;


set serveroutput on
set term on;
set lines 200
ble
fe r a
set pause off
ans
/*== Check the current segment type of the LOB ==*/
n - t r
o
an
/*== ==*/
/*== Note that the segment subtype for
/*== BasicFile LOB storage is ASSM
==*/
==*/ s
ha deฺ
r )
ฺa Gui
SELECT segment_name, segment_type, segment_subtype m
FROM dba_segments
WHERE tablespace_name = 'SECF_TBS1' on
ฺco dent
AND segment_type = 'LOBSEGMENT' @a S tu
/
z ill e t hi s

lo us e
r c econtinue...
pause Press [Enter] to
m a e to
set pause on e ( ns
i l l li c
Z the interime
e l o
/*== Create table for online redefinition ==*/
r c
Ma/*== Note that the recommended practice is to enable ==*/
/*==

/*== COMPRESSION and DEDUPLICATION at table creation ==*/


/*== time. Also, the ALTER TABLE SHRINK operation is ==*/
/*== not yet supported for SecureFiles LOBs in ==*/
/*== release 1 of Oracle Database 11g. ==*/

CREATE TABLE sf_demo.resumes_interim


(id NUMBER, first_name VARCHAR2(15),
last_name VARCHAR2 (40), resume BLOB)
LOB (resume) STORE AS SECUREFILE
(TABLESPACE secf_tbs2
COMPRESS HIGH
DEDUPLICATE)
/

pause Press [Enter] to continue...

/*== Perform the online redefinition ==*/

DECLARE
error_count PLS_INTEGER := 0;

Oracle Database 11g: New Features for Administrators 451


BEGIN

DBMS_REDEFINITION.START_REDEF_TABLE
('sf_demo', 'resumes', 'resumes_interim',
'id id, first_name first_name, last_name last_name, resume resume',
OPTIONS_FLAG => DBMS_REDEFINITION.CONS_USE_ROWID);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
('sf_demo', 'resumes', 'resumes_interim',
1, true,true,true,false, error_count);

DBMS_OUTPUT.PUT_LINE('Errors := ' || TO_CHAR(error_count));

DBMS_REDEFINITION.FINISH_REDEF_TABLE
('sf_demo', 'resumes', 'resumes_interim');

ble
END;
fe r a
/
ans
pause Press [Enter] to continue...
n - t r
o
/*== Drop the interim table ==*/
s an
r ) ha deฺ
DROP TABLE sf_demo.resumes_interim
/ m ฺa Gui
n ฺ co ent
pause Press [Enter] to continue...
@ ao Stud
set pause off
z i l le this
c e loฺ thesemigrated LOB ==*/
type of u
/*== Check the segment
a r to
/*==
( m n s e ==*/
/*== Note that
i l l e LOB
the
c e
segment subtype for ==*/

l o Z
/*== SecureFiles li storage is SECUREFILE ==*/

rce segment_name, segment_type, segment_subtype


aSELECT
M FROM dba_segments
WHERE tablespace_name = 'SECF_TBS2'
AND segment_type = 'LOBSEGMENT'
/
pause Press [Enter] to continue...

set pause off

/*== Check the DBA_LOBS data dictionary view for ==*/


/*== information on the SecureFiles COMPRESSION ==*/
/*== and DEDUPLICATION settings ==*/

SELECT column_name, segment_name,


compression, deduplication, securefile
FROM dba_lobs
WHERE owner = 'SF_DEMO' and table_name = 'RESUMES'
/

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 452


/home/oracle/solutions/SecF/read_data.sql:
connect sf_demo/oracle_4U

set serveroutput on
set verify on
set term on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set lines 200

timing start read_data


exec read_lob;
timing stop

----------------------------------------------------------

/home/oracle/solutions/SecF/secf_setup.sql:
ble
-- run this script as SYS
fe r a
connect / as sysdba
ans
set echo on;
n - t r
o
an
set serveroutput on
-- set verify on;
set term on; s
ha deฺ
set lines 200 r )
ฺa Gui
set pause on m
co ==*/ n t
n ฺ e
/*== Store the encryption key in the TDE
@ ao Stud
wallet

l le thisby "welcome1";
alter system set wallet open iidentified
z
c e loฺ KEYuAUTHENTICATED
se
a r
ALTER SYSTEM SET ENCRYPTION
t o BY "welcome1"
/
l e (m ense
pause Press l
Zi [Enter]licto continue...
l o
a r ce
M /*== Create a database account for this OBE ==*/
DROP USER sf_demo CASCADE
/

CREATE USER sf_demo IDENTIFIED BY oracle_4U


DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON users
/

GRANT connect, resource TO sf_demo


/

GRANT EXECUTE ANY PROCEDURE, CREATE ANY DIRECTORY TO sf_demo


/

pause Press [Enter] to continue...

/*== Create tablespaces to store the LOB tables ==*/


/*== ==*/

Oracle Database 11g: New Features for Administrators 453


/*== Note that SecureFile LOB storage requires ASSM.==*/
/*== The segment allocation unit is 64MB. ==*/

DROP TABLESPACE secf_tbs1 INCLUDING CONTENTS


/
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

CREATE TABLESPACE secf_tbs1


DATAFILE '+DATA' SIZE 150M REUSE
EXTENT MANAGEMENT LOCAL
UNIFORM SIZE 64M
SEGMENT SPACE MANAGEMENT AUTO
/

DROP TABLESPACE secf_tbs2 INCLUDING CONTENTS


/

ble
CREATE TABLESPACE secf_tbs2
fe r a
DATAFILE '+DATA' SIZE 150M REUSE
EXTENT MANAGEMENT LOCAL
ans
UNIFORM SIZE 64M
n - t r
SEGMENT SPACE MANAGEMENT AUTO
a no
/
h a s ฺ
pause Press [Enter] to continue...
ฺ a r) uide
c m uses
othat n t G
/*== As SF_DEMO, create a table with a LOB ฺ
on tude
BasicFile LOB storage ==*/

connect sf_demo/oracle_4U a
@ is S
i l l e
CREATE TABLE resumes
l o ฺz se th
(id NUMBER, first_name
a rceVARCHAR2(15),
t o u
( m
last_name VARCHAR2(40),
s e
resume BLOB)
e icen
illsecf_tbs1)
LOB(resume) STORE AS BASICFILE
Z
(TABLESPACE
l o l
/
e
arc
M pause Press [Enter] to continue...
/*== Create a DIRECTORY object. It is required for accessing the MS Word files
==*/
/*== to be loaded into the LOB column. Enter the full path to the files, omit
==*/
/*== the final "/" at the end.
==*/

CREATE OR REPLACE DIRECTORY cwd AS '&directory_name';

pause Press [Enter] to continue...

/*== Create the procedure to read the MS Word files and load them into the LOB
column ==*/

CREATE OR REPLACE PROCEDURE loadLOBFromBFILE_proc (dest_loc IN OUT BLOB,


file_name IN VARCHAR2)
IS
src_loc BFILE := BFILENAME('CWD', file_name);
amount INTEGER := 4000;

Oracle Database 11g: New Features for Administrators 454


BEGIN

DBMS_LOB.OPEN(src_loc, DBMS_LOB.LOB_READONLY);
amount := DBMS_LOB.GETLENGTH(src_loc);
DBMS_LOB.LOADFROMFILE(dest_loc, src_loc, amount);
DBMS_LOB.CLOSE(src_loc);
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

END;
/

show errors

pause Press [Enter] to continue...

/*== Create the procedure to insert LOBs into the table ==*/

ble
CREATE OR REPLACE PROCEDURE write_lob (p_file IN VARCHAR2)
fe r a
IS
i NUMBER;
ans
fn VARCHAR2(15);
n - t r
ln VARCHAR2(40);
a no
b BLOB;
h a s ฺ
BEGIN
ฺ a r) uide
DBMS_OUTPUT.ENABLE;

DBMS_OUTPUT.PUT_LINE('Begin inserting rows...'); c om ent G
FOR i IN 1 .. 30 LOOP
a on tud
l l e@ is S
fn:=SUBSTR(p_file,1,INSTR(p_file,'.')-1);
i
ฺz (i,sefn,thln, EMPTY_BLOB())
ln:=SUBSTR(p_file,INSTR(p_file,'.')+1,LENGTH(p_file)-INSTR(p_file,'.')-4);
l
INSERT INTO resumes VALUESo
RETURNING resume
a rceINTO tb;o u
l e (m ense '|| i ||' inserted.');
loadLOBFromBFILE_proc(b,p_file);
DBMS_OUTPUT.PUT_LINE('Row
Zi
END LOOP; l lic
l o
rce
COMMIT;
aEND;
M/
show errors

pause Press [Enter] to continue...

/*== Create the procedure to read LOBs from the table ==*/

CREATE OR REPLACE PROCEDURE read_lob


IS
lob_loc BLOB;
CURSOR resumes_cur IS
SELECT id, first_name, last_name, resume
FROM resumes;
resumes_rec resumes%ROWTYPE;
BEGIN
OPEN resumes_cur;
LOOP
FETCH resumes_cur INTO resumes_rec;
lob_loc := resumes_rec.resume;
DBMS_OUTPUT.PUT_LINE('The length is: '|| DBMS_LOB.GETLENGTH(lob_loc));

Oracle Database 11g: New Features for Administrators 455


DBMS_OUTPUT.PUT_LINE('The ID is: '|| resumes_rec.id);
-- just print out the first 200 bytes of the LOB
-- because DBMS_OUTPUT.PUT_LINE cannot display more than 255 bytes
DBMS_OUTPUT.PUT_LINE('The blob is read: '||
UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(lob_loc,200,1)));
EXIT WHEN resumes_cur%NOTFOUND;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

END LOOP;
CLOSE resumes_cur;
END;
/
show errors

pause Press [Enter] to continue...

/*== Create a procedure for checking BasicFile LOB space usage. ==*/
/*== ==*/
ble
/*== Note that the DBMS_SPACE.SPACE_USAGE procedure has been ==*/
fe r a
/*==
/*==
overloaded. There are 2 DBMS_SPACE.SPACE_USAGE procedures. ==*/
The two cannot be used interchangeably. The invocation of ==*/
ans
/*== the DBMS_SPACE.SPACE_USAGE procedure here is ONLY valid ==*/
n - t r
o
an
/*== for use against BasicFile LOBs. ==*/

CREATE OR REPLACE PROCEDURE check_space_bf s


ha deฺ
IS r )
ฺa Gui
m
co ent
l_fs1_bytes NUMBER;
n ฺ
l_fs2_bytes NUMBER;
l_fs3_bytes NUMBER; @ ao Stud
l_fs4_bytes NUMBER;
z i l le this
l_fs1_blocks NUMBER; oฺ
c e l u se
l_fs2_blocks NUMBER;
a r to
m
l_fs3_blocks NUMBER;
e
l_fs4_blocks
i l l e ( NUMBER;
c e ns
l o Z
l_full_bytes li
NUMBER;
e
l_full_blocks NUMBER;

Marcl_unformatted_bytes NUMBER;
l_unformatted_blocks NUMBER;
v_segname VARCHAR2(500);
BEGIN
SELECT segment_name
INTO v_segname
FROM user_lobs
WHERE table_name = 'RESUMES'
AND column_name = 'RESUME';

DBMS_SPACE.SPACE_USAGE(
segment_owner => 'SF_DEMO',
segment_name => v_segname,
segment_type => 'LOB',
fs1_bytes => l_fs1_bytes,
fs1_blocks => l_fs1_blocks,
fs2_bytes => l_fs2_bytes,
fs2_blocks => l_fs2_blocks,
fs3_bytes => l_fs3_bytes,
fs3_blocks => l_fs3_blocks,
fs4_bytes => l_fs4_bytes,
fs4_blocks => l_fs4_blocks,

Oracle Database 11g: New Features for Administrators 456


full_bytes => l_full_bytes,
full_blocks => l_full_blocks,
unformatted_blocks => l_unformatted_blocks,
unformatted_bytes => l_unformatted_bytes
);
DBMS_OUTPUT.ENABLE;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

DBMS_OUTPUT.PUT_LINE(' FS1 Blocks = '||l_fs1_blocks||' Bytes =


'||l_fs1_bytes);
DBMS_OUTPUT.PUT_LINE(' FS2 Blocks = '||l_fs2_blocks||' Bytes =
'||l_fs2_bytes);
DBMS_OUTPUT.PUT_LINE(' FS3 Blocks = '||l_fs3_blocks||' Bytes =
'||l_fs3_bytes);
DBMS_OUTPUT.PUT_LINE(' FS4 Blocks = '||l_fs4_blocks||' Bytes =
'||l_fs4_bytes);
DBMS_OUTPUT.PUT_LINE('Full Blocks = '||l_full_blocks||' Bytes =
'||l_full_bytes);
ble
DBMS_OUTPUT.PUT_LINE('Unformatted Blocks = '||l_unformatted_blocks||' Bytes =
fe r a
'||l_unformatted_bytes);
DBMS_OUTPUT.PUT_LINE('=============================================');
ans
n
DBMS_OUTPUT.PUT_LINE('Total Blocks = '||to_char(l_fs1_blocks + l_fs2_blocks +- t r
no
l_fs3_blocks + l_fs4_blocks + l_full_blocks)|| '
a
|| Total Bytes = '||
h a s ฺ
to_char(l_fs1_bytes + l_fs2_bytes +
a r) uide
l_fs3_bytes + l_fs4_bytes + l_full_bytes));

END;
/ ฺ c om ent G
a on tud
show errors
l l e@ is S
i
ฺz se th
l o
pause Press [Enter] to continue...

a rcefor tchecking
o u
( m
/*== Create a procedure
s e SecureFiles LOB space usage. ==*/
/*==
/*== NoteZthat en
ille thelicDBMS_SPACE.SPACE_USAGE procedure has been
==*/
==*/
l o
eThe two cannot be used interchangeably. The invocation of ==*/
/*== overloaded. There are 2 DBMS_SPACE.SPACE_USAGE procedures.
r c
Ma/*== the DBMS_SPACE.SPACE_USAGE procedure here is ONLY valid
/*== ==*/
==*/
/*== for use against SecureFiles LOBs. ==*/

CREATE OR REPLACE PROCEDURE check_space_sf


IS
l_segment_size_blocks NUMBER;
l_segment_size_bytes NUMBER;
l_used_blocks NUMBER;
l_used_bytes NUMBER;
l_expired_blocks NUMBER;
l_expired_bytes NUMBER;
l_unexpired_blocks NUMBER;
l_unexpired_bytes NUMBER;
v_segname varchar2(30);
BEGIN
SELECT segment_name
INTO v_segname
FROM user_lobs
WHERE table_name = 'RESUMES'
AND column_name = 'RESUME';
DBMS_SPACE.SPACE_USAGE(

Oracle Database 11g: New Features for Administrators 457


segment_owner => 'SF_DEMO',
segment_name => v_segname,
segment_type => 'LOB',
segment_size_blocks => l_segment_size_blocks,
segment_size_bytes => l_segment_size_bytes,
used_blocks => l_used_blocks,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

used_bytes => l_used_bytes,


expired_blocks => l_expired_blocks,
expired_bytes => l_expired_bytes,
unexpired_blocks => l_unexpired_blocks,
unexpired_bytes => l_unexpired_bytes
);
DBMS_OUTPUT.ENABLE;
DBMS_OUTPUT.PUT_LINE(' Segment Blocks = '||l_segment_size_blocks||' Bytes =
'||l_segment_size_bytes);
DBMS_OUTPUT.PUT_LINE(' Used Blocks = '||l_used_blocks||' Bytes =
ble
'||l_used_bytes);
fe r a
DBMS_OUTPUT.PUT_LINE(' Expired Blocks = '||l_expired_blocks||' Bytes =
'||l_expired_bytes);
ans
DBMS_OUTPUT.PUT_LINE(' Unexpired Blocks = '||l_unexpired_blocks||' Bytes =
n - t r
o
an
'||l_unexpired_bytes);

END; s
DBMS_OUTPUT.PUT_LINE('=============================================');
ha deฺ
/ r )
ฺa Gui
show errors m
co ent
n ฺ
@ ao Stud
----------------------------------------------------------
z i l le this
c e loฺ use
/home/oracle/solutions/SecF/space_usage.sql:
r
connect sf_demo/oracle_4U
a to
m
( on s e
ille licen
set serveroutput
set pauseZoff

r c elo on
set echo
a
M exec check_space_&Enter_BF_or_SF_for_LOB_type
----------------------------------------------------------

/home/oracle/solutions/SecF/write_data.sql:
connect sf_demo/oracle_4U

set serveroutput on
set verify on
set term on
set lines 200

timing start load_data


exec write_lob('karl.brimmer.doc');
exec write_lob('monica.petera.doc');
exec write_lob('david.sloan.doc');
timing stop

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 458


/home/oracle/solutions/TC/cleanup.sql:
connect sh/sh
drop table sales_nocompress purge
/
drop table sales_compress purge
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/
drop table q_sales purge;
drop table q_sales2 purge;

----------------------------------------------------------

/home/oracle/solutions/TC/create_sales_tbls.sql:
set echo on
set pagesize 2000
ble
set long 10000
fe r a
set linesize 200
REM
ans
REM
n - t r
o
an
connect sh/sh
drop table sales_nocompress purge
/ s
ha deฺ
drop table sales_compress purge r )
ฺa Gui
/ m
co ent
set echo on
n ฺ
set timing on
create table sales_nocompress @ ao Stud
as select * from sales
z i l le this
/
c e loฺ use
a r o
tcompress
( m
create table sales_compress
s e for all operations

ille licen
as select * from sales where 1=0
/ Z
r c elocount(*)
a
select
M from sales_compress
/

@oltp_insert

set timing off


select count(*) from sales_compress
/
select count(*) from sales_nocompress
/

----------------------------------------------------------

/home/oracle/solutions/TC/dml_perf.sql:
set echo off
set pagesize 2000
set long 10000
set linesize 200
REM
REM
connect sh/sh

Oracle Database 11g: New Features for Administrators 459


set echo on
set timing on
delete from sales_nocompress
/

commit;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

delete from sales_compress


/

commit;

set timing off


select count(*) from sales_nocompress
/
select count(*) from sales_compress
ble
/
fe r a
----------------------------------------------------------
ans
n - t r
o
an
/home/oracle/solutions/TC/examine_storage.sql:
set echo off
set pagesize 2000 s
ha deฺ
set long 10000 r )
ฺa Gui
set linesize 200 m
co ent
set feedback on
n ฺ
REM @ ao Stud
REM
z i l le this
c e loฺ use
set echo on
a r to
m e
l e ( icesum(bytes)/1024/1024
select segment_name,
i l ns mb
Z
from dba_segments
where lo
l
cesegment_name in ('SALES_COMPRESS','SALES_NOCOMPRESS')
owner = user
a r
and
M group by segment_name
order by segment_name
/

select table_name,compression,compress_for from user_tables where table_name


like '%COMPRESS%';

----------------------------------------------------------

/home/oracle/solutions/TC/oltp_insert.sql:
set timing on
declare

commit_after integer := 0 ;
loop_variable integer ;

cursor c_sales is
select prod_id
, cust_id
, time_id

Oracle Database 11g: New Features for Administrators 460


, channel_id
, promo_id
, quantity_sold
, amount_sold
from sales ;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

begin

for r_sales in c_sales


loop

if commit_after = 0
then

loop_variable := 0 ;

ble
commit_after := round(dbms_random.value(1,1)) ;
fe r a
end if ;
ans
n - t r
o
an
insert into sales_compress

amount_sold) s
(prod_id, cust_id, time_id, channel_id, promo_id, quantity_sold,
ha deฺ
values r )
ฺa Gui
( r_sales.prod_id m
co ent
, r_sales.cust_id
n ฺ
, r_sales.time_id
, r_sales.channel_id @ ao Stud
, r_sales.promo_id
z i l le this
, r_sales.quantity_sold
c e loฺ use
, r_sales.amount_sold
a r to
) ;
m e
i l l e ( ice=ncommit_after
s
Z
if loop_variable
l o l
rc e
then

Ma
commit ;
commit_after := 0 ;
end if ;

loop_variable := loop_variable + 1 ;

end loop ;

end ;
/
set timing off

----------------------------------------------------------

/home/oracle/solutions/TC/setup.sql:
connect / as sysdba
set echo on
alter user sh identified by sh account unlock
quota unlimited on users;
grant create tablespace to sh;
grant drop tablespace to sh;

Oracle Database 11g: New Features for Administrators 461


----------------------------------------------------------

/home/oracle/solutions/dbreplay/pp11.2.0.1.0/wcr_calibrate.xml:
<ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ lٛ iٛ bٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 1ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ
bl e
ٛ ٛ ٛ ٛ
fe r a
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
an s
ٛ ٛ ٛ ٛ
n - t r
o
an
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ
s
ha deฺ
ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
r )
ฺa Gui
ٛ 1ٛ 1ٛ :ٛ 3ٛ 6ٛ :ٛ 5ٛ 7ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
m
ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
co ent

ٛ 1ٛ 1ٛ :ٛ 4ٛ 6ٛ :ٛ 2ٛ 5ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
n
@ ao Stud
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 9ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 2ٛ 8ٛ
ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
i l le this
ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 7ٛ 6ٛ 1ٛ 7ٛ 3ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ
z
c e loฺ use
ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 8ٛ 2ٛ 8ٛ 3ٛ 9ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ
ٛ ٛ ٛ ٛ
a r to
m e
ٛ <ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >ٛ Iٛ Nٛ Cٛ Lٛ Uٛ Dٛ Eٛ <ٛ /ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >
ٛ
i l l e ( icens
oZ l
ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ 2ٛ <ٛ /ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ
l
ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ 9ٛ 4ٛ 4ٛ 9ٛ 6ٛ 6ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 7ٛ 9ٛ 7ٛ 9ٛ 0ٛ 5ٛ 9ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 1ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 1ٛ 6ٛ 3ٛ 6ٛ 9ٛ 1ٛ 8ٛ 7ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 6ٛ 4ٛ 5ٛ 6ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ 7ٛ 3ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _
ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ 2ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 2ٛ 2ٛ 4ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ t
ٛ oٛ tٛ aٛ lٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ 1ٛ 5ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 4ٛ 6ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ

Oracle Database 11g: New Features for Administrators 462


ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 6ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 7ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Nٛ Oٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ lٛ aٛ sٛ tٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ lٛ aٛ sٛ t
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ <ٛ iٛ nٛ pٛ uٛ tٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ _ٛ pٛ eٛ rٛ _ٛ cٛ pٛ uٛ >ٛ 4ٛ <ٛ /ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ _ٛ pٛ eٛ rٛ _ٛ cٛ pٛ uٛ >ٛ
ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ hٛ rٛ eٛ aٛ dٛ sٛ _ٛ pٛ eٛ rٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ >ٛ 5ٛ 0ٛ <ٛ /ٛ tٛ hٛ rٛ eٛ aٛ dٛ sٛ _ٛ pٛ eٛ rٛ _ٛ pٛ rٛ o
bl e
ٛ cٛ eٛ sٛ sٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ iٛ nٛ pٛ uٛ tٛ >ٛ fe r a
ٛ ٛ ٛ <ٛ oٛ uٛ tٛ pٛ uٛ tٛ >ٛ
ans
ٛ ٛ ٛ ٛ
n - t r
ٛ nٛ tٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ a no
ٛ <ٛ mٛ aٛ xٛ _ٛ cٛ oٛ nٛ cٛ uٛ rٛ rٛ eٛ nٛ tٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ 7ٛ <ٛ /ٛ mٛ aٛ xٛ _ٛ cٛ oٛ nٛ cٛ uٛ rٛ rٛ e

h a s ฺ
ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ tٛ aٛ lٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ 1ٛ 3ٛ <ٛ /ٛ tٛ oٛ tٛ aٛ lٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ

ฺ a r) uide
ٛ ٛ ٛ ٛ ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ 1ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ

ٛ ٛ ٛ ٛ
ฺ c om ent G
ٛ ٛ ٛ ٛ ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ pٛ uٛ sٛ >ٛ 1ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ pٛ uٛ sٛ >ٛ

on tud
ٛ <ٛ mٛ eٛ mٛ _ٛ pٛ eٛ rٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ >ٛ 2ٛ 6ٛ .ٛ 2ٛ 5ٛ <ٛ /ٛ mٛ eٛ mٛ _ٛ pٛ eٛ rٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ >ٛ
a
ٛ ٛ ٛ <ٛ /ٛ oٛ uٛ tٛ pٛ uٛ tٛ >ٛ
l l e@ is S
i
ฺz se th
ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ lٛ iٛ bٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
ٛ
l o
rce to u
----------------------------------------------------------
a
l e (m ense
/home/oracle/solutions/dbreplay/rep306657099/wcr_rr_306657099.xml:
<ٛ rٛ eٛ pٛ oZ l
ٛ ri ٛ tٛ ٛ dٛlibc
ٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ =ٛ "ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ "ٛ >ٛ
ٛ ٛ
e l o
aٛ <rٛcrٛ eٛ pٛ oٛ rٛ tٛ _ٛ iٛ dٛ >ٛ <ٛ !ٛ [ٛ Cٛ Dٛ Aٛ Tٛ Aٛ [ٛ /ٛ oٛ rٛ aٛ rٛ eٛ pٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ aٛ yٛ /ٛ aٛ lٛ l
M ٛٛ ?ٛٛ rٛٛ e<ٛٛ phٛٛ leٛٛ aaٛٛ ydٛٛ _eٛٛ irٛٛ d>ٛٛ =ٛ 2ٛ ]ٛ ]ٛ >ٛ <ٛ /ٛ rٛ eٛ pٛ oٛ rٛ tٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ iٛ nٛ sٛ tٛ aٛ nٛ cٛ eٛ _ٛ iٛ dٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ iٛ nٛ sٛ tٛ aٛ nٛ cٛ eٛ _ٛ nٛ aٛ mٛ eٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ hٛ oٛ sٛ tٛ _ٛ nٛ aٛ mٛ eٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ nٛ aٛ mٛ eٛ >ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 1ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ y
ٛ _ٛ nٛ aٛ mٛ eٛ >ٛ

Oracle Database 11g: New Features for Administrators 463


ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ sٛ tٛ aٛ tٛ uٛ sٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 1ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ fe r a
an s
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
n - t r
o
an
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ
s
ha deฺ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ
r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
m
ٛ 1ٛ 1ٛ :ٛ 3ٛ 6ٛ :ٛ 5ٛ 7ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
co ent

ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
n
@ ao Stud
ٛ 1ٛ 1ٛ :ٛ 4ٛ 6ٛ :ٛ 2ٛ 5ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 9ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 2ٛ 8ٛ
i l le this
ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
z
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 7ٛ 6ٛ 1ٛ 7ٛ 3ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ

a r
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 8ٛ 2ٛ 8ٛ 3ٛ 9ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ
to
ٛ ٛ ٛ ٛ ٛ ٛ
m e
i l l e ( icens
ٛ <ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >ٛ Iٛ Nٛ Cٛ Lٛ Uٛ Dٛ Eٛ <ٛ /ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >

oZ l
ٛ
l
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ 2ٛ <ٛ /ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ 9ٛ 4ٛ 4ٛ 9ٛ 6ٛ 6ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 7ٛ 9ٛ 7ٛ 9ٛ 0ٛ 5ٛ 9ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 1ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 1ٛ 6ٛ 3ٛ 6ٛ 9ٛ 1ٛ 8ٛ 7ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 6ٛ 4ٛ 5ٛ 6ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ 7ٛ 3ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _
ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ 2ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 2ٛ 2ٛ 4ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ t
ٛ oٛ tٛ aٛ lٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ 1ٛ 5ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 4ٛ 6ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ

Oracle Database 11g: New Features for Administrators 464


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 6ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 7ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Nٛ Oٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ lٛ aٛ sٛ tٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ lٛ aٛ sٛ t
ٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 1ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ ٛ
fe r a
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
an s
ٛ ٛ ٛ ٛ ٛ ٛ
n - t r
o
an
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
s
ha deฺ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ r )
ฺa Gui
m
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
co ent
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
n ฺ
@ ao Stud
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ pٛ rٛ eٛ pٛ aٛ rٛ eٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
i l le this
ٛ 1ٛ 2ٛ :ٛ 0ٛ 5ٛ :ٛ 4ٛ 5ٛ <ٛ /ٛ pٛ rٛ eٛ pٛ aٛ rٛ eٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
z
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ

a r
ٛ 1ٛ 2ٛ :ٛ 1ٛ 0ٛ :ٛ 3ٛ 6ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
to
m e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ

i l l e ( icens
ٛ 1ٛ 2ٛ :ٛ 1ٛ 8ٛ :ٛ 1ٛ 4ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ

oZ l
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 7ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 3ٛ 8ٛ
l
ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ 2ٛ <ٛ /ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ _ٛ dٛ oٛ nٛ eٛ >ٛ 2ٛ <ٛ /ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ _ٛ dٛ oٛ nٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ sٛ yٛ nٛ cٛ hٛ rٛ oٛ nٛ iٛ zٛ aٛ tٛ iٛ oٛ nٛ >ٛ Sٛ Cٛ Nٛ <ٛ /ٛ sٛ yٛ nٛ cٛ hٛ rٛ oٛ nٛ iٛ zٛ aٛ tٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ c
ٛ aٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ aٛ uٛ tٛ oٛ _ٛ cٛ oٛ rٛ rٛ eٛ cٛ tٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ m
ٛ eٛ _ٛ aٛ uٛ tٛ oٛ _ٛ cٛ oٛ rٛ rٛ eٛ cٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 1ٛ 2ٛ 6ٛ 5ٛ 5ٛ 4ٛ 9ٛ 7ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 3ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ nٛ eٛ tٛ wٛ oٛ rٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 4ٛ 0ٛ 7ٛ 9ٛ 1ٛ 7ٛ 3ٛ <ٛ /ٛ nٛ eٛ tٛ wٛ oٛ rٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ

Oracle Database 11g: New Features for Administrators 465


ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 4ٛ 2ٛ 8ٛ 5ٛ 3ٛ 6ٛ 5ٛ 2ٛ 9ٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ eٛ lٛ aٛ pٛ sٛ eٛ dٛ _ٛ tٛ iٛ mٛ eٛ _ٛ dٛ iٛ fٛ fٛ >ٛ 0ٛ <ٛ /ٛ eٛ lٛ aٛ pٛ sٛ eٛ dٛ _ٛ tٛ iٛ mٛ eٛ _ٛ dٛ iٛ fٛ fٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 7ٛ 0ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 7ٛ 1ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Yٛ Eٛ Sٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ <ٛ sٛ uٛ mٛ mٛ aٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ >ٛ fe r a
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
an s
- t r
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ oٛ nٛ lٛ yٛ >ٛ 0ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ oٛ nٛ lٛ yٛ >ٛ
n
o
an
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ eٛ wٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ nٛ eٛ wٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ
s
ha deฺ
ٛ <ٛ mٛ uٛ tٛ aٛ tٛ eٛ dٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ mٛ uٛ tٛ aٛ tٛ eٛ dٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ >ٛ r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
m
co ent

ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
n
@ ao Stud
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
i l le this
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
z
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ

a r
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
to
m e
ٛ ٛ ٛ <ٛ /ٛ sٛ uٛ mٛ mٛ aٛ rٛ yٛ >ٛ

i l l e ( icens
ٛ ٛ ٛ <ٛ bٛ oٛ dٛ yٛ >ٛ

oZ l
ٛ ٛ ٛ ٛ ٛ <ٛ wٛ oٛ rٛ kٛ lٛ oٛ aٛ dٛ _ٛ pٛ rٛ oٛ fٛ iٛ lٛ eٛ >ٛ
l
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ sٛ hٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ oٛ tٛ aٛ lٛ _ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 1ٛ <ٛ /ٛ tٛ oٛ tٛ aٛ lٛ _ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ aٛ sٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ mٛ oٛ dٛ uٛ lٛ eٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ qٛ lٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ wٛ oٛ rٛ kٛ lٛ oٛ aٛ dٛ _ٛ pٛ rٛ oٛ fٛ iٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ qٛ lٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ qٛ lٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ uٛ cٛ kٛ eٛ tٛ iٛ zٛ eٛ dٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ

Oracle Database 11g: New Features for Administrators 466


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ uٛ cٛ kٛ eٛ tٛ iٛ zٛ eٛ dٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ aٛ lٛ eٛ rٛ tٛ sٛ /ٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ bٛ oٛ dٛ yٛ >ٛ
ٛ <ٛ /ٛ rٛ eٛ pٛ oٛ rٛ tٛ >ٛ
ٛ
----------------------------------------------------------

/home/oracle/solutions/dbreplay/rep399696155/wcr_rr_399696155.xml:
<ٛ rٛ eٛ pٛ oٛ rٛ tٛ ٛ dٛ bٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ =ٛ "ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ "ٛ >ٛ
ٛ ٛ
ٛ <ٛ rٛ eٛ pٛ oٛ rٛ tٛ _ٛ iٛ dٛ >ٛ <ٛ !ٛ [ٛ Cٛ Dٛ Aٛ Tٛ Aٛ [ٛ /ٛ oٛ rٛ aٛ rٛ eٛ pٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ aٛ yٛ /ٛ aٛ lٛ l
bl e
ٛ ?ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ dٛ =ٛ 1ٛ 5ٛ ]ٛ ]ٛ >ٛ <ٛ /ٛ rٛ eٛ pٛ oٛ rٛ tٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ <ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ fe r a
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
an s
ٛ ٛ ٛ ٛ ٛ ٛ
n - t r
o
an
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
s
ha deฺ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ r )
ฺa Gui
m
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
co ent
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
n ฺ
ٛ ٛ ٛ ٛ ٛ ٛ
@ ao Stud
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
z i l le this
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ iٛ nٛ sٛ tٛ aٛ nٛ cٛ eٛ _ٛ iٛ dٛ /ٛ >ٛ

a r
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ iٛ nٛ sٛ tٛ aٛ nٛ cٛ eٛ _ٛ nٛ aٛ mٛ eٛ /ٛ >ٛ
to
m e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ hٛ oٛ sٛ tٛ _ٛ nٛ aٛ mٛ eٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
i l l e ( icens
oZ l
ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ nٛ aٛ mٛ eٛ >ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 2ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ y
l
ٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ sٛ tٛ aٛ tٛ uٛ sٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 1ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ

Oracle Database 11g: New Features for Administrators 467


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 1ٛ :ٛ 3ٛ 6ٛ :ٛ 5ٛ 7ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 1ٛ :ٛ 4ٛ 6ٛ :ٛ 2ٛ 5ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 9ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 2ٛ 8ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 7ٛ 6ٛ 1ٛ 7ٛ 3ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 8ٛ 2ٛ 8ٛ 3ٛ 9ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >ٛ Iٛ Nٛ Cٛ Lٛ Uٛ Dٛ Eٛ <ٛ /ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ 2ٛ <ٛ /ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ 9ٛ 4ٛ 4ٛ 9ٛ 6ٛ 6ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 7ٛ 9ٛ 7ٛ 9ٛ 0ٛ 5ٛ 9ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ ٛ
fe r a
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 1ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ
an s
ٛ ٛ ٛ ٛ ٛ ٛ
n - t r
o
an
ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 1ٛ 6ٛ 3ٛ 6ٛ 9ٛ 1ٛ 8ٛ 7ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ s
ha deฺ
r )
ฺa Gui
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 6ٛ 4ٛ 5ٛ 6ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ l
ٛ >ٛ
m
co ent
ٛ ٛ ٛ ٛ ٛ ٛ
n ฺ
ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ
@ ao Stud
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ 7ٛ 3ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _

i l le this
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ 2ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ
z
ٛ ٛ ٛ ٛ ٛ ٛ
c e loฺ use
a r
ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 2ٛ 2ٛ 4ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ t
to
ٛ oٛ tٛ aٛ lٛ >ٛ
m e
i l l e ( icens
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ 1ٛ 5ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ

oZ l
ٛ ٛ ٛ ٛ ٛ ٛ
l
ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 4ٛ 6ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 6ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 7ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Nٛ Oٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ lٛ aٛ sٛ tٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ lٛ aٛ sٛ t
ٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 2ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ

Oracle Database 11g: New Features for Administrators 468


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ pٛ rٛ eٛ pٛ aٛ rٛ eٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ 1ٛ 4ٛ :ٛ 5ٛ 7ٛ :ٛ 5ٛ 3ٛ <ٛ /ٛ pٛ rٛ eٛ pٛ aٛ rٛ eٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 5ٛ :ٛ 0ٛ 1ٛ :ٛ 2ٛ 2ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 5ٛ :ٛ 0ٛ 9ٛ :ٛ 0ٛ 1ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 7ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 3ٛ 9ٛ
ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ 2ٛ <ٛ /ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ _ٛ dٛ oٛ nٛ eٛ >ٛ 2ٛ <ٛ /ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ _ٛ dٛ oٛ nٛ eٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ ٛ
fe r
ٛ <ٛ sٛ yٛ nٛ cٛ hٛ rٛ oٛ nٛ iٛ zٛ aٛ tٛ iٛ oٛ nٛ >ٛ Sٛ Cٛ Nٛ <ٛ /ٛ sٛ yٛ nٛ cٛ hٛ rٛ oٛ nٛ iٛ zٛ aٛ tٛ iٛ oٛ nٛ >ٛ
a
ٛ ٛ ٛ ٛ ٛ ٛ
an s
- t r
ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ c
n
o
an
ٛ aٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
s
ha deฺ
ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >
ٛ r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ
m
co ent

ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ aٛ uٛ tٛ oٛ _ٛ cٛ oٛ rٛ rٛ eٛ cٛ tٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ m
n
@ ao Stud
ٛ eٛ _ٛ aٛ uٛ tٛ oٛ _ٛ cٛ oٛ rٛ rٛ eٛ cٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
i l le this
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 2ٛ 0ٛ 4ٛ 5ٛ 1ٛ 2ٛ 6ٛ 6ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
z
ٛ ٛ ٛ ٛ ٛ ٛ
c e loฺ use
a r
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 4ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c
to
m e
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
i l l e ( icens
oZ l
ٛ <ٛ nٛ eٛ tٛ wٛ oٛ rٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 2ٛ 4ٛ 1ٛ 2ٛ 5ٛ 3ٛ 1ٛ 5ٛ 4ٛ <ٛ /ٛ nٛ eٛ tٛ wٛ oٛ rٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
l
ٛ ٛ ٛ ٛ ٛ ٛ
e
Marcٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 1ٛ 8ٛ 0ٛ 6ٛ 7ٛ 8ٛ 5ٛ 4ٛ 0ٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ eٛ lٛ aٛ pٛ sٛ eٛ dٛ _ٛ tٛ iٛ mٛ eٛ _ٛ dٛ iٛ fٛ fٛ >ٛ 0ٛ <ٛ /ٛ eٛ lٛ aٛ pٛ sٛ eٛ dٛ _ٛ tٛ iٛ mٛ eٛ _ٛ dٛ iٛ fٛ fٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 7ٛ 6ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 7ٛ 7ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Yٛ Eٛ Sٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ <ٛ sٛ uٛ mٛ mٛ aٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ oٛ nٛ lٛ yٛ >ٛ 0ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ oٛ nٛ lٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ eٛ wٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ nٛ eٛ wٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ mٛ uٛ tٛ aٛ tٛ eٛ dٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ mٛ uٛ tٛ aٛ tٛ eٛ dٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ

Oracle Database 11g: New Features for Administrators 469


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ sٛ uٛ mٛ mٛ aٛ rٛ yٛ >ٛ
ٛ ٛ ٛ <ٛ bٛ oٛ dٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ wٛ oٛ rٛ kٛ lٛ oٛ aٛ dٛ _ٛ pٛ rٛ oٛ fٛ iٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ sٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ oٛ tٛ aٛ lٛ _ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 5ٛ <ٛ /ٛ tٛ oٛ tٛ aٛ lٛ _ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ aٛ sٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ vٛ eٛ nٛ tٛ ٛ eٛ vٛ eٛ nٛ tٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ lٛ oٛ gٛ ٛ fٛ iٛ lٛ eٛ
ٛ sٛ yٛ nٛ cٛ "ٛ ٛ wٛ aٛ iٛ tٛ _ٛ cٛ lٛ aٛ sٛ sٛ =ٛ "ٛ Cٛ oٛ mٛ mٛ iٛ tٛ "ٛ fe r a
ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ =ٛ "ٛ 1ٛ "ٛ /ٛ >ٛ
an s
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ tٛ oٛ pٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ >ٛ
n - t r
o
an
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ mٛ oٛ dٛ uٛ lٛ eٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ mٛ oٛ dٛ uٛ lٛ eٛ
s
ha deฺ
ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ Sٛ Yٛ Sٛ $ٛ Uٛ Sٛ Eٛ Rٛ Sٛ "ٛ
r )
ฺa Gui
ٛ mٛ oٛ dٛ uٛ lٛ eٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ wٛ rٛ cٛ @ٛ eٛ dٛ rٛ sٛ rٛ 2ٛ 2ٛ pٛ 1ٛ .ٛ uٛ sٛ .ٛ oٛ rٛ aٛ cٛ lٛ eٛ .ٛ cٛ oٛ m
m
ٛ ٛ (ٛ Tٛ Nٛ Sٛ ٛ Vٛ 1ٛ -ٛ Vٛ 3ٛ )ٛ "ٛ ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ =ٛ "ٛ 1ٛ "ٛ >ٛ
co ent

ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ cٛ tٛ iٛ oٛ nٛ ٛ aٛ cٛ tٛ iٛ oٛ nٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ Uٛ Nٛ Nٛ Aٛ Mٛ Eٛ Dٛ "ٛ
n
@ ao Stud
ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ =ٛ "ٛ 1ٛ "ٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ mٛ oٛ dٛ uٛ lٛ eٛ >ٛ
i l le this
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ tٛ oٛ pٛ _ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ mٛ oٛ dٛ uٛ lٛ eٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ
z
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ qٛ lٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ

a r
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ >ٛ
to
m e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ iٛ dٛ =ٛ "ٛ 4ٛ 7ٛ "ٛ

i l l e ( icens
ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ sٛ eٛ rٛ iٛ aٛ lٛ =ٛ "ٛ 2ٛ 9ٛ 4ٛ 2ٛ 2ٛ "ٛ ٛ uٛ sٛ eٛ rٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ Jٛ Fٛ Vٛ "ٛ

oZ l
ٛ pٛ rٛ oٛ gٛ rٛ aٛ mٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ wٛ rٛ cٛ @ٛ eٛ dٛ rٛ sٛ rٛ 2ٛ 2ٛ pٛ 1ٛ .ٛ uٛ sٛ .ٛ oٛ rٛ aٛ cٛ lٛ eٛ .ٛ cٛ o
l
ٛ mٛ ٛ (ٛ Tٛ Nٛ Sٛ ٛ Vٛ 1ٛ -ٛ Vٛ 3ٛ )ٛ "ٛ ٛ aٛ sٛ hٛ _ٛ nٛ uٛ mٛ _ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ =ٛ "ٛ 0ٛ "ٛ
e
Marcٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ =ٛ "ٛ 1ٛ "ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ vٛ eٛ nٛ tٛ ٛ eٛ vٛ eٛ nٛ tٛ _ٛ nٛ aٛ mٛ eٛ =ٛ "ٛ lٛ oٛ gٛ ٛ fٛ iٛ lٛ eٛ
ٛ sٛ yٛ nٛ cٛ "ٛ ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ =ٛ "ٛ 1ٛ "ٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ tٛ oٛ pٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ wٛ oٛ rٛ kٛ lٛ oٛ aٛ dٛ _ٛ pٛ rٛ oٛ fٛ iٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ qٛ lٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ qٛ lٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ uٛ cٛ kٛ eٛ tٛ iٛ zٛ eٛ dٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ

Oracle Database 11g: New Features for Administrators 470


ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ uٛ cٛ kٛ eٛ tٛ iٛ zٛ eٛ dٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ aٛ lٛ eٛ rٛ tٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ bٛ oٛ dٛ yٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ <ٛ /ٛ rٛ eٛ pٛ oٛ rٛ tٛ >ٛ
ٛ
----------------------------------------------------------

/home/oracle/solutions/dbreplay/rep528064593/wcr_rr_528064593.xml:
<ٛ rٛ eٛ pٛ oٛ rٛ tٛ ٛ dٛ bٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ =ٛ "ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ "ٛ >ٛ
ٛ ٛ
ٛ <ٛ rٛ eٛ pٛ oٛ rٛ tٛ _ٛ iٛ dٛ >ٛ <ٛ !ٛ [ٛ Cٛ Dٛ Aٛ Tٛ Aٛ [ٛ /ٛ oٛ rٛ aٛ rٛ eٛ pٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ aٛ yٛ /ٛ aٛ lٛ l
ٛ ?ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ dٛ =ٛ 2ٛ 3ٛ ]ٛ ]ٛ >ٛ <ٛ /ٛ rٛ eٛ pٛ oٛ rٛ tٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ <ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
bl e
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ fe r a
an s
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
n - t r
o
an
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
s
ha deฺ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ
m
co ent

ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
n
ٛ >ٛ
@ ao Stud
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ iٛ nٛ sٛ tٛ aٛ nٛ cٛ eٛ _ٛ iٛ dٛ /ٛ >ٛ
i l le this
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ iٛ nٛ sٛ tٛ aٛ nٛ cٛ eٛ _ٛ nٛ aٛ mٛ eٛ /ٛ >ٛ
z
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ hٛ oٛ sٛ tٛ _ٛ nٛ aٛ mٛ eٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
a r to
m e
ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ nٛ aٛ mٛ eٛ >ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 3ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ y

i l l e ( icens
ٛ _ٛ nٛ aٛ mٛ eٛ >ٛ

oZ l
ٛ ٛ ٛ ٛ ٛ ٛ
l
ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ sٛ tٛ aٛ tٛ uٛ sٛ >
e
Marcٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 1ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ _ٛ sٛ hٛ aٛ rٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ

Oracle Database 11g: New Features for Administrators 471


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 1ٛ :ٛ 3ٛ 6ٛ :ٛ 5ٛ 7ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 1ٛ :ٛ 4ٛ 6ٛ :ٛ 2ٛ 5ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 9ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 2ٛ 8ٛ
ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 7ٛ 6ٛ 1ٛ 7ٛ 3ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ sٛ cٛ nٛ >ٛ


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ 2ٛ 2ٛ 8ٛ 2ٛ 8ٛ 3ٛ 9ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ sٛ cٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >ٛ Iٛ Nٛ Cٛ Lٛ Uٛ Dٛ Eٛ <ٛ /ٛ dٛ eٛ fٛ aٛ uٛ lٛ tٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ 2ٛ <ٛ /ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ _ٛ uٛ sٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ 9ٛ 4ٛ 4ٛ 9ٛ 6ٛ 6ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ sٛ iٛ zٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 7ٛ 9ٛ 7ٛ 9ٛ 0ٛ 5ٛ 9ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
bl e
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ fe r a
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 1ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c

ٛ ٛ ٛ ٛ ٛ ٛ
an s
- t r
ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 1ٛ 6ٛ 3ٛ 6ٛ 9ٛ 1ٛ 8ٛ 7ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
n
o
an
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
s
ha deฺ
ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 6ٛ 4ٛ 5ٛ 6ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ tٛ oٛ tٛ aٛ l
ٛ >ٛ r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ
m
co ent

ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ 7ٛ 3ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ _
n
ٛ uٛ nٛ rٛ eٛ pٛ lٛ aٛ yٛ aٛ bٛ lٛ eٛ >ٛ
@ ao Stud
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ 2ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
z i l le this
c e loฺ use
ٛ <ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 2ٛ 2ٛ 4ٛ 0ٛ <ٛ /ٛ tٛ rٛ aٛ nٛ sٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ _ٛ t
ٛ oٛ tٛ aٛ lٛ >ٛ
a r to
m e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ 1ٛ 5ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
i l l e ( icens
oZ l
ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ 4ٛ 6ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ sٛ _ٛ tٛ oٛ tٛ aٛ lٛ >ٛ
l
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 6ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 6ٛ 7ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Nٛ Oٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ lٛ aٛ sٛ tٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ lٛ aٛ sٛ t
ٛ _ٛ pٛ rٛ oٛ cٛ eٛ sٛ sٛ eٛ dٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ aٛ mٛ eٛ >ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ gٛ rٛ iٛ dٛ 3ٛ <ٛ /ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ Oٛ Rٛ Cٛ Lٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ nٛ aٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ vٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ 1ٛ 1ٛ .ٛ 2ٛ .ٛ 0ٛ .ٛ 1ٛ .ٛ 0ٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ v
ٛ eٛ rٛ sٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ lٛ >ٛ Nٛ Oٛ <ٛ /ٛ dٛ aٛ tٛ aٛ bٛ aٛ sٛ eٛ _ٛ pٛ aٛ rٛ aٛ lٛ lٛ eٛ l
ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ Dٛ Bٛ Rٛ Eٛ Pٛ Lٛ Aٛ Yٛ <ٛ /ٛ dٛ iٛ rٛ eٛ cٛ tٛ oٛ rٛ yٛ >ٛ

Oracle Database 11g: New Features for Administrators 472


ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ /ٛ hٛ oٛ mٛ eٛ /ٛ oٛ rٛ aٛ cٛ lٛ eٛ /ٛ sٛ oٛ lٛ uٛ tٛ iٛ oٛ nٛ sٛ /ٛ dٛ bٛ rٛ eٛ pٛ lٛ a
ٛ yٛ <ٛ /ٛ dٛ iٛ rٛ _ٛ pٛ aٛ tٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ Cٛ Oٛ Mٛ Pٛ Lٛ Eٛ Tٛ Eٛ Dٛ <ٛ /ٛ sٛ tٛ aٛ tٛ uٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ pٛ rٛ eٛ pٛ aٛ rٛ eٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 5ٛ :ٛ 4ٛ 6ٛ :ٛ 5ٛ 5ٛ <ٛ /ٛ pٛ rٛ eٛ pٛ aٛ rٛ eٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 5ٛ :ٛ 4ٛ 9ٛ :ٛ 3ٛ 7ٛ <ٛ /ٛ sٛ tٛ aٛ rٛ tٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 0ٛ 5ٛ -ٛ 1ٛ 0ٛ -ٛ 0ٛ 9ٛ
ٛ 1ٛ 5ٛ :ٛ 5ٛ 7ٛ :ٛ 1ٛ 5ٛ <ٛ /ٛ eٛ nٛ dٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ 7ٛ ٛ mٛ iٛ nٛ uٛ tٛ eٛ sٛ ٛ 3ٛ 8ٛ
ٛ sٛ eٛ cٛ oٛ nٛ dٛ sٛ <ٛ /ٛ dٛ uٛ rٛ aٛ tٛ iٛ oٛ nٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ 2ٛ <ٛ /ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ _ٛ dٛ oٛ nٛ eٛ >ٛ 2ٛ <ٛ /ٛ nٛ uٛ mٛ _ٛ cٛ lٛ iٛ eٛ nٛ tٛ sٛ _ٛ dٛ oٛ nٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
bl e
ٛ fe r a
ٛ <ٛ sٛ yٛ nٛ cٛ hٛ rٛ oٛ nٛ iٛ zٛ aٛ tٛ iٛ oٛ nٛ >ٛ Fٛ Aٛ Lٛ Sٛ Eٛ <ٛ /ٛ sٛ yٛ nٛ cٛ hٛ rٛ oٛ nٛ iٛ zٛ aٛ tٛ iٛ oٛ nٛ >

ٛ ٛ ٛ ٛ ٛ ٛ
an s
- t r
ٛ <ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ cٛ oٛ nٛ nٛ eٛ cٛ tٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ c
n
o
an
ٛ aٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
s
ha deฺ
ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >ٛ 1ٛ 0ٛ 0ٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ sٛ cٛ aٛ lٛ eٛ >
ٛ r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ
m
co ent

ٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ _ٛ aٛ uٛ tٛ oٛ _ٛ cٛ oٛ rٛ rٛ eٛ cٛ tٛ >ٛ Tٛ Rٛ Uٛ Eٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ m
n
@ ao Stud
ٛ eٛ _ٛ aٛ uٛ tٛ oٛ _ٛ cٛ oٛ rٛ rٛ eٛ cٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ 4ٛ 3ٛ 3ٛ 7ٛ <ٛ /ٛ uٛ sٛ eٛ rٛ _ٛ cٛ aٛ lٛ lٛ sٛ >ٛ
i l le this
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ 1ٛ 0ٛ 4ٛ 7ٛ 3ٛ 9ٛ 8ٛ 5ٛ <ٛ /ٛ dٛ bٛ tٛ iٛ mٛ eٛ >ٛ
z
ٛ ٛ ٛ ٛ ٛ ٛ
c e loฺ use
a r
ٛ <ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ cٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ .ٛ 0ٛ 2ٛ <ٛ /ٛ aٛ vٛ eٛ rٛ aٛ gٛ eٛ _ٛ aٛ c
to
m e
ٛ tٛ iٛ vٛ eٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
i l l e ( icens
oZ l
ٛ <ٛ nٛ eٛ tٛ wٛ oٛ rٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 3ٛ 3ٛ 5ٛ 9ٛ 3ٛ 1ٛ 1ٛ <ٛ /ٛ nٛ eٛ tٛ wٛ oٛ rٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
l
ٛ ٛ ٛ ٛ ٛ ٛ
e
Marcٛ <ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ 4ٛ 2ٛ 9ٛ 6ٛ 9ٛ 4ٛ 9ٛ 0ٛ 1ٛ <ٛ /ٛ tٛ hٛ iٛ nٛ kٛ _ٛ tٛ iٛ mٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ eٛ lٛ aٛ pٛ sٛ eٛ dٛ _ٛ tٛ iٛ mٛ eٛ _ٛ dٛ iٛ fٛ fٛ >ٛ 0ٛ <ٛ /ٛ eٛ lٛ aٛ pٛ sٛ eٛ dٛ _ٛ tٛ iٛ mٛ eٛ _ٛ dٛ iٛ fٛ fٛ >
ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ 1ٛ 2ٛ 2ٛ 6ٛ 5ٛ 4ٛ 9ٛ 4ٛ 4ٛ 4ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ dٛ bٛ iٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 8ٛ 0ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ bٛ eٛ gٛ iٛ nٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ 1ٛ 8ٛ 1ٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ nٛ dٛ _ٛ sٛ nٛ aٛ pٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ Yٛ Eٛ Sٛ <ٛ /ٛ aٛ wٛ rٛ _ٛ eٛ xٛ pٛ oٛ rٛ tٛ eٛ dٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ rٛ eٛ pٛ lٛ aٛ yٛ _ٛ iٛ nٛ fٛ oٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ hٛ eٛ aٛ dٛ eٛ rٛ >ٛ
ٛ ٛ ٛ <ٛ sٛ uٛ mٛ mٛ aٛ rٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ oٛ nٛ lٛ yٛ >ٛ 0ٛ <ٛ /ٛ cٛ aٛ pٛ tٛ uٛ rٛ eٛ _ٛ oٛ nٛ lٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ nٛ eٛ wٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ nٛ eٛ wٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ mٛ uٛ tٛ aٛ tٛ eٛ dٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ 0ٛ <ٛ /ٛ mٛ uٛ tٛ aٛ tٛ eٛ dٛ _ٛ eٛ rٛ rٛ oٛ rٛ sٛ >ٛ

Oracle Database 11g: New Features for Administrators 473


ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 0ٛ <ٛ /ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ sٛ uٛ mٛ mٛ aٛ rٛ yٛ >ٛ
ٛ ٛ ٛ <ٛ bٛ oٛ dٛ yٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ wٛ oٛ rٛ kٛ lٛ oٛ aٛ dٛ _ٛ pٛ rٛ oٛ fٛ iٛ lٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ aٛ sٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ
ٛ <ٛ tٛ oٛ tٛ aٛ lٛ _ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ >ٛ 1ٛ <ٛ /ٛ tٛ oٛ tٛ aٛ lٛ _ٛ aٛ sٛ hٛ _ٛ cٛ oٛ uٛ nٛ tٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ aٛ sٛ hٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ
ble
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ eٛ rٛ vٛ iٛ cٛ eٛ _ٛ mٛ oٛ dٛ uٛ lٛ eٛ _ٛ aٛ cٛ tٛ iٛ oٛ nٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ qٛ lٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ fe r a
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ tٛ oٛ pٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ eٛ vٛ eٛ nٛ tٛ sٛ /ٛ >ٛ
an s
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ wٛ oٛ rٛ kٛ lٛ oٛ aٛ dٛ _ٛ pٛ rٛ oٛ fٛ iٛ lٛ eٛ >ٛ
n - t r
o
an
ٛ ٛ ٛ ٛ ٛ <ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ s
ha deฺ
r )
ฺa Gui
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ _ٛ fٛ aٛ iٛ lٛ uٛ rٛ eٛ sٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
m
co ent
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
n ฺ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ qٛ lٛ /ٛ >ٛ
@ ao Stud
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ eٛ sٛ sٛ iٛ oٛ nٛ /ٛ >ٛ
i
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ eٛ rٛ rٛ oٛ rٛ >ٛ
z l le this
c e loฺ use
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ

a r
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
to
m e
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ sٛ qٛ lٛ /ٛ >ٛ

i l l e ( icens
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ uٛ cٛ kٛ eٛ tٛ iٛ zٛ eٛ dٛ /ٛ >ٛ

oZ l
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ mٛ lٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
l
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
e
Marcٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ yٛ _ٛ aٛ pٛ pٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ bٛ uٛ cٛ kٛ eٛ tٛ iٛ zٛ eٛ dٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ qٛ uٛ eٛ rٛ yٛ _ٛ dٛ aٛ tٛ aٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ /ٛ dٛ iٛ vٛ eٛ rٛ gٛ eٛ nٛ cٛ eٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ aٛ lٛ eٛ rٛ tٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ ٛ ٛ <ٛ fٛ iٛ lٛ tٛ eٛ rٛ sٛ /ٛ >ٛ
ٛ ٛ ٛ <ٛ /ٛ bٛ oٛ dٛ yٛ >ٛ
ٛ <ٛ /ٛ rٛ eٛ pٛ oٛ rٛ tٛ >ٛ
ٛ
----------------------------------------------------------

/home/oracle/solutions/part/add_partition.sql:
REM
REM REF Partitioning
REM 6.insert data into the REF partitioned table and show that co-location of
the dependent data is taken place
REM

set echo on

set pagesize 2000


set long 10000

Oracle Database 11g: New Features for Administrators 474


set linesize 200
set feedback on
column partition_name format a25
column high_value format a85
set echo on
set feedback on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

-- manageability aspects and flexibility to combine PMOPs but still have the
flexibility to place various partitions

alter table orders


add partition p2007_01 values less than (to_date('01-feb-2007','dd-mon-yyyy'))
tablespace x;

-- show co-location of partitions for parent and child

ble
select table_name, partition_name, tablespace_name, high_value
fe r a
from user_tab_partitions where table_name in ('ORDERS','ORDER_ITEMS')
order by partition_position, table_name;
ans
n - t r
-- second PMOP
a no
alter table orders
h a s ฺ
a r) uide
add partition p2007_02 values less than (to_date('01-mar-2007','dd-mon-yyyy'))

tablespace x
dependent tables ( order_items (partitionฺc omtablespace
n t G y));
on tude high_value
foo

select table_name, partition_name, a


@ is S
tablespace_name,
i l l e
ฺz se th
from user_tab_partitions

e l o
where table_name in ('ORDERS','ORDER_ITEMS')
u
order by partition_position,
table_name;
a r c to
m e
i l l e ( icens
Z l
----------------------------------------------------------
l o
a r ce
/home/oracle/solutions/part/alter_hist_newsales.sql:
M set echo on
set pagesize 2000
set long 10000
set linesize 200
set feedback on
column partition_name format a25
column high_value format a85
REM
REM 7.take a standard range partitioned table and extend it to an interval
partitioned table. This demonstrates the migration path to this new
functionality.
REM
set echo on
-- change the partitioned table to become interval partitioned
alter table historical_newsales
set interval (NUMTOYMINTERVAL(1, 'YEAR'))
/

----------------------------------------------------------

/home/oracle/solutions/part/cleanup_1.sql:

Oracle Database 11g: New Features for Administrators 475


REM
REM REF Partitioning
REM

set echo on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

set pagesize 2000


set long 10000
set linesize 200
set feedback on
column partition_name format a25
column high_value format a85
set echo on
set feedback on

-- cleanup
ble
fe r a
alter table orders drop partition p2007_01;
alter table orders drop partition p2007_02;
ans
n - t r
drop tablespace x;
a no
drop tablespace y;
h a s ฺ
a r) uide
----------------------------------------------------------


/home/oracle/solutions/part/count_shipments.sql: c om ent G
set echo on
a on tud
set pagesize 2000
l l e@ is S
set long 10000 i
ฺz se th
set linesize 200
l
e ouo
set feedback on
a rcformat t a25
m
column partition_name
( s e
ille licen
column high_value format a85
Z
lo extended
r c e1.Recap
REM New composite partitions

MaREM 2.Introduce the new extension based on business cases (e.g. RANGE-RANGE on
REM the concept of composite partitioned tables

oder_date/ship_date
REM 3.Demonstrate the data placement for a business scenario
REM

REM
REM EXTENDED COMPOSITE PARTITIONING
REM
set echo on

-- show how data was distributed for this business case

select count(1) from shipments subpartition (P_2006_OCT_EARLY) ;


select count(1) from shipments subpartition (P_2006_OCT_AGREED) ;
select count(1) from shipments subpartition (P_2006_OCT_LATE) ;

----------------------------------------------------------

Oracle Database 11g: New Features for Administrators 476


/home/oracle/solutions/part/create_emp.sql:
set echo off
REM RUDIMENTARY PARTITIONING OBE
REM
REM v0.1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

REM
REM mwiel 10/18/06 - initial creation
REM hbaer 02/07/07 - first adjustments and extensions
REM
REM
REM
REM

ble
set pagesize 2000
fe r a
set long 10000
set linesize 200
ans
set feedback on
n - t r
column partition_name format a25
a no
column high_value format a85
h a s ฺ
REM
ฺ a r) uide
REM Virtual column-based partitioning
c
REM 1.Introduce the concept of a virtual ฺcolumnom (e.g.
e n t G
Extract the month out of a
n
date)
REM 2.Create a simple virtual column @
o select
aand S tudfrom it (you can also highlight
that you can collect stats onilsuch
z le a tcolumn)
h is
purposes this can be c e loฺ ugoofy
REM 3.Create a virtual column-based
se partitioned table (for demonstration

a r and show
to the data placement based on the virtual column
something like adding two column values or so)
m
REM 4.insert some data
definitions e ( ns e
REM Z i l l li c e
l o
rceecho on
aset
M drop
/
table emp

drop table product_returns


/

-- create a table with a virtual column

create table emp


( empno number(4) not null
, ename varchar2(10)
, job varchar2(9)
, mgr number(4)
, hiredate date
, sal number(7,2)
, comm number(7,2)
, deptno number(2)
, well_off as (case sign(1000 - (sal + nvl(comm,0)))
when 1 then 'poor'

Oracle Database 11g: New Features for Administrators 477


else case sign(3000 - (sal + nvl(comm,0)))
when 1 then 'not doing too bad'
when 0 then 'on target'
else 'filthy rich'
end
end
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

) virtual
)
/

----------------------------------------------------------

/home/oracle/solutions/part/create_employees.sql:
set echo on
set pagesize 2000
set long 10000
ble
set linesize 200
fe r a
set feedback on
column partition_name format a25
ans
column high_value format a85
n - t r
o
REM
s an
REM Virtual column-based partitioning
r ) ha deฺ
date) m ฺa Gui
REM 1.Introduce the concept of a virtual column (e.g. Extract the month out of a

ฺ co ent
REM 2.Create a simple virtual column and select from it (you can also highlight
n
@ ao Stud
that you can collect stats on such a column)
REM 3.Create a virtual column-based partitioned table (for demonstration
z i l le this
purposes this can be something goofy like adding two column values or so)

c e loฺ use
REM 4.insert some data and show the data placement based on the virtual column
definitions
a r to
REM
m e
onill
set echo Z
e ( icens
l o l
/rce
drop table employees

M a
drop table product_returns
/

-- create a table with a virtual column

create table employees


( employee_id number(6) not null
, first_name varchar2(20)
, last_name varchar2(25)
, email varchar2(25)
, phone_number varchar2(20)
, hiredate date
, job_id varchar2(10)
, salary number(8,2)
, commission_pct number(2,2)
, manager_id number(6)
, department_id number(4)
, well_off as (case sign(1000 - (salary + nvl(commission_pct,0)))

Oracle Database 11g: New Features for Administrators 478


when 1 then 'poor'
else case sign(3000 - (salary + nvl(commission_pct,0)))
when 1 then 'not doing too bad'
when 0 then 'on target'
else 'filthy rich'
end
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

end
) virtual
)
/

----------------------------------------------------------

/home/oracle/solutions/part/create_hist_newsales.sql:
set echo on
set pagesize 2000
ble
set long 10000
fe r a
set linesize 200
set feedback on
ans
column partition_name format a25
n - t r
o
an
column high_value format a85
REM
REM Interval Partitioning s
ha deฺ
r )
ฺa Gui
REM 7.take a standard range partitioned table and extend it to an interval
m
partitioned table. This demonstrates the migration path to this new
co ent
functionality.
n ฺ
REM
set echo on @ ao Stud
z i l le this
-- create a range partitioned table, that will be migrated to interval
partitioning
c e loฺ use
r
create table historical_newsales
a to
m
( prod_id number(6) not null
e
l e ( icens
, cust_id number not null
i l
oZ l
, time_id date not null
e l
, channel_id char(1) not null

Marc, promo_id number(6) not null


, quantity_sold number(3) not null
, amount_sold number(10,2) not null
)
partition by range (time_id)
(partition p_previous_century values
less than (to_date('01-JAN-2000','dd-MON-yyyy'))
, partition p_2000 values less than (to_date('01-JAN-2001','dd-MON-yyyy'))
, partition p_2001 values less than (to_date('01-JAN-2002','dd-MON-yyyy'))
, partition p_2002 values less than (to_date('01-JAN-2003','dd-MON-yyyy'))
, partition p_2003 values less than (to_date('01-JAN-2004','dd-MON-yyyy'))
, partition p_2004 values less than (to_date('01-JAN-2005','dd-MON-yyyy'))
, partition p_2005 values less than (to_date('01-JAN-2006','dd-MON-yyyy'))
)
/

----------------------------------------------------------

/home/oracle/solutions/part/create_newsales.sql:

Oracle Database 11g: New Features for Administrators 479


set echo on

set pagesize 2000


set long 10000
set linesize 200
set feedback on
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

column partition_name format a25


column high_value format a85

REM
REM Interval Partitioning
REM 1.Introduce the concept of Interval Partitioning
REM 2.Create an interval partitioned table
REM

-- cleanup
ble
set echo on
fe r a
drop table historical_newsales
ans
/
n - t r
o
drop table newsales
s an
/
r ) ha deฺ
-- create interval partitioned table m ฺa Gui
n ฺ co ent
create table newsales
( prod_id number(6) not null @ ao Stud
, cust_id number not null
z i l le this
, time_id date not null oฺ
, channel_id char(1) c e l null use
a rnot nullto
not

l
, quantity_solde m
, promo_id number(6)
( number(3)
e n senot null
l
Zi number(10,2)
, amount_sold lic not null
l o
rce by range (time_id)
)
apartition
M interval (numtodsinterval(1,'DAY'))
( partition p_before_1_jan_2005 values
less than (to_date('01-01-2005','dd-mm-yyyy')))
/

----------------------------------------------------------

/home/oracle/solutions/part/create_order_items.sql:
REM
REM REF Partitioning
REM 3.Create a REF partitioned table that depends on the first created one (e.g.
Lineitems, pk-fk order_id)

set echo on

set pagesize 2000


set long 10000
set linesize 200
set feedback on
column partition_name format a25

Oracle Database 11g: New Features for Administrators 480


column high_value format a85

-- Create a table order_items with a reference to the orders table partition


scheme
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Rem see ORA-14652 for restrictions around REF Partitionining FKs

create table order_items


( order_id number(12) not null
, product_id number not null
, quantity number not null
, sales_amount number not null
, constraint order_items_orders_fk foreign key (order_id) references
orders(order_id)
ble
)
fe r a
partition by reference (order_items_orders_fk)
parallel
ans
/
n - t r
a no
----------------------------------------------------------
h a s ฺ
ฺ a r) uide
/home/oracle/solutions/part/create_orders.sql:
REM ฺ c om ent G
REM REF Partitioning
a on tud
REM 1.Introduce the concept of REF
l e S Orders, partitioned by order_date,
@tableis(e.g.
Partitioning
i l h
oฺz use t
REM 2.Create a simple partitioned
PK order_id)
e l
a rc to
set echo on
m
( ens e
i l l e2000
l o Z10000 lic
set pagesize

celinesize 200
set long
a r
set
M set feedback on
column partition_name format a25
column high_value format a85

-- cleanup

drop table order_items


/

drop table orders

Вам также может понравиться