Cannot use PARALLEL on GTTs ?

  • From: "Chitale, Hemant K" <Hemant-K.Chitale@xxxxxx>
  • To: "ORACLE-L" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 6 Mar 2014 14:59:29 +0800

In 11.2 documentation on the PARALLEL Hint,
http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements006.ht
m#BABHFDDH   I find this statement :
Oracle ignores parallel hints on temporary tables.

I ran a simple test (script below) and find that I can see only 1 PQ
Slave Set for an INSERT PARALLEL SELECT PARALLEL execution.

REM Test PARALLEL Operations on GTT

spool GTT_Parallel_Ops
set echo on

alter session enable parallel dml;

drop table GTT_PARALLEL_OPS_TEST;
create global temporary table GTT_PARALLEL_OPS_TEST
(id_column number, data_col_1 varchar2(30), data_col_2 varchar2(128),
date_col date)
on commit preserve rows
/

alter table GTT_PARALLEL_OPS_TEST parallel 4;

insert /*+ PARALLEL (MANUAL) */ into GTT_PARALLEL_OPS_TEST
select object_id, owner, object_name, created
from dba_objects
/

commit;

pause set up another session to monitor next DML

insert /*+ PARALLEL (MANUAL) */ into GTT_PARALLEL_OPS_TEST
select /*+ PARALLEL (MANUAL) */ * from GTT_PARALLEL_OPS_TEST
/

commit;
exec dbms_stats.gather_table_stats('','GTT_PARALLEL_OPS_TEST');
select num_Rows from user_tables
where table_name = 'GTT_PARALLEL_OPS_TEST'
/

select /*+ PARALLEL (MANUAL) */ count(*) from GTT_PARALLEL_OPS_TEST;

spool off

Hemant K Chitale




This email and any attachments are confidential and may also be privileged. If 
you are not the intended recipient, please delete all copies and notify the 
sender immediately. You may wish to refer to the incorporation details of 
Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at 
https://www.sc.com/en/incorporation-details.html.

Other related posts: