반응형
/********************************************************************************************
-- Title : [ORA10g] Direct-Load - ver.dbrang
-- Reference : dbrang.tistory.com
-- Key word : 다이렉트 direct load append parallel
********************************************************************************************/
-- 테이블 생성
-- drop table scott.tables;
create table scott.tables
( owner varchar2(10) not null
, table_name varchar2(50) not null
, tablespace_name varchar2(50) null
, status varchar2(10) not null
, last_analyzed date null
) tablespace users;

-- Direct-Load(logging)
insert /*+ APPEND */
into scott.tables
logging
select owner, table_name, tablespace_name, status, last_analyzed
from sys.dba_tables;
commit;

-- Direct-Load(nologging)
insert
/*+ APPEND */
into scott.tables
nologging
select owner, table_name, tablespace_name, status, last_analyzed
from sys.dba_tables;
commit;

-- 병렬 Direct-Load 삽입 사용
alter session enable parallel dml;

insert
/*+ PARALLEL(scott.tables, 2) */
into scott.tables
nologging
select /*+ parallel(sys.dba_tables, 2) */
       owner, table_name, tablespace_name, status, last_analyzed
from sys.dba_tables;
commit;
반응형

+ Recent posts